diff mbox series

[13/14] tag: mark unused parameters in each_tag_name_fn callbacks

Message ID 20230703064433.GM3537614@coredump.intra.peff.net (mailing list archive)
State Accepted
Commit cc2f810172a09f8c451594b3662c010830b37903
Headers show
Series more -Wunused-parameter annotations | expand

Commit Message

Jeff King July 3, 2023, 6:44 a.m. UTC
We iterate over the set of input tag names using callbacks. But not all
operations need the same inputs, so some parameters go unused (but of
course not the same ones for each operation). Mark the unused ones to
avoid -Wunused-parameter warnings.

Signed-off-by: Jeff King <peff@peff.net>
---
 builtin/tag.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/builtin/tag.c b/builtin/tag.c
index e63bee8eab..81ca3fa19a 100644
--- a/builtin/tag.c
+++ b/builtin/tag.c
@@ -121,7 +121,7 @@  static int for_each_tag_name(const char **argv, each_tag_name_fn fn,
 	return had_error;
 }
 
-static int collect_tags(const char *name, const char *ref,
+static int collect_tags(const char *name UNUSED, const char *ref,
 			const struct object_id *oid, void *cb_data)
 {
 	struct string_list *ref_list = cb_data;
@@ -155,7 +155,7 @@  static int delete_tags(const char **argv)
 	return result;
 }
 
-static int verify_tag(const char *name, const char *ref,
+static int verify_tag(const char *name, const char *ref UNUSED,
 		      const struct object_id *oid, void *cb_data)
 {
 	int flags;