diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-09-14 22:56:38 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-09-14 22:56:39 +0300 |
commit | a6b42ec0c6e2ef492b0ed6d1f1123dc7e724154e (patch) | |
tree | ee3cd1f07f639913c04501f6562a7bbc9b4ad4b8 /t/helper | |
parent | e188ec3a735ae52a0d0d3c22f9df6b29fa613b1e (diff) | |
parent | 776515ef8b381d49caeccfe2e8da98cb666e257a (diff) |
Merge branch 'jk/unused-annotation'
Annotate function parameters that are not used (but cannot be
removed for structural reasons), to prepare us to later compile
with -Wunused warning turned on.
* jk/unused-annotation:
is_path_owned_by_current_uid(): mark "report" parameter as unused
run-command: mark unused async callback parameters
mark unused read_tree_recursive() callback parameters
hashmap: mark unused callback parameters
config: mark unused callback parameters
streaming: mark unused virtual method parameters
transport: mark bundle transport_options as unused
refs: mark unused virtual method parameters
refs: mark unused reflog callback parameters
refs: mark unused each_ref_fn parameters
git-compat-util: add UNUSED macro
Diffstat (limited to 't/helper')
-rw-r--r-- | t/helper/test-config.c | 2 | ||||
-rw-r--r-- | t/helper/test-ref-store.c | 4 | ||||
-rw-r--r-- | t/helper/test-userdiff.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/t/helper/test-config.c b/t/helper/test-config.c index a6e936721f..ddd538b838 100644 --- a/t/helper/test-config.c +++ b/t/helper/test-config.c @@ -37,7 +37,7 @@ * */ -static int iterate_cb(const char *var, const char *value, void *data) +static int iterate_cb(const char *var, const char *value, void *UNUSED(data)) { static int nr; diff --git a/t/helper/test-ref-store.c b/t/helper/test-ref-store.c index 4d18bfb1ca..8f930ad358 100644 --- a/t/helper/test-ref-store.c +++ b/t/helper/test-ref-store.c @@ -161,7 +161,7 @@ static int cmd_rename_ref(struct ref_store *refs, const char **argv) } static int each_ref(const char *refname, const struct object_id *oid, - int flags, void *cb_data) + int flags, void *UNUSED(cb_data)) { printf("%s %s 0x%x\n", oid_to_hex(oid), refname, flags); return 0; @@ -207,7 +207,7 @@ static int cmd_for_each_reflog(struct ref_store *refs, const char **argv) static int each_reflog(struct object_id *old_oid, struct object_id *new_oid, const char *committer, timestamp_t timestamp, - int tz, const char *msg, void *cb_data) + int tz, const char *msg, void *UNUSED(cb_data)) { printf("%s %s %s %" PRItime " %+05d%s%s", oid_to_hex(old_oid), oid_to_hex(new_oid), committer, timestamp, tz, diff --git a/t/helper/test-userdiff.c b/t/helper/test-userdiff.c index f013f8a31e..64538a0c20 100644 --- a/t/helper/test-userdiff.c +++ b/t/helper/test-userdiff.c @@ -12,7 +12,7 @@ static int driver_cb(struct userdiff_driver *driver, return 0; } -static int cmd__userdiff_config(const char *var, const char *value, void *cb) +static int cmd__userdiff_config(const char *var, const char *value, void *UNUSED(cb)) { if (userdiff_config(var, value) < 0) return -1; |