summaryrefslogtreecommitdiffstats
path: root/builtin
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-02-24 01:39:46 -0500
committerJunio C Hamano <gitster@pobox.com>2023-02-24 09:13:33 -0800
commita5c76b3698f3672afecd65eed233b095123ae1d6 (patch)
tree679277ec2632636910160ddf47bfafe2f4e8ed17 /builtin
parentuserformat_want_item(): mark unused parameter (diff)
downloadgit-a5c76b3698f3672afecd65eed233b095123ae1d6.tar.gz
git-a5c76b3698f3672afecd65eed233b095123ae1d6.zip
run_processes_parallel: mark unused callback parameters
Our parallel process API takes several callbacks via function pointers in the run_process_paralell_opts struct. Not every callback needs every parameter; let's mark the unused ones to make -Wunused-parameter happy. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/fetch.c6
-rw-r--r--builtin/submodule--helper.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index a21ce89312..c6b1845429 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -1890,7 +1890,8 @@ struct parallel_fetch_state {
int next, result;
};
-static int fetch_next_remote(struct child_process *cp, struct strbuf *out,
+static int fetch_next_remote(struct child_process *cp,
+ struct strbuf *out UNUSED,
void *cb, void **task_cb)
{
struct parallel_fetch_state *state = cb;
@@ -1912,7 +1913,8 @@ static int fetch_next_remote(struct child_process *cp, struct strbuf *out,
return 1;
}
-static int fetch_failed_to_start(struct strbuf *out, void *cb, void *task_cb)
+static int fetch_failed_to_start(struct strbuf *out UNUSED,
+ void *cb, void *task_cb)
{
struct parallel_fetch_state *state = cb;
const char *remote = task_cb;
diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index 4c173d8b37..ad272a0d93 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -2132,9 +2132,9 @@ static int update_clone_get_next_task(struct child_process *child,
return 0;
}
-static int update_clone_start_failure(struct strbuf *err,
+static int update_clone_start_failure(struct strbuf *err UNUSED,
void *suc_cb,
- void *idx_task_cb)
+ void *idx_task_cb UNUSED)
{
struct submodule_update_clone *suc = suc_cb;