diff mbox series

[10/14] replace: mark unused parameter in ref callback

Message ID 20230703064425.GJ3537614@coredump.intra.peff.net (mailing list archive)
State Accepted
Commit 80d4e5f3a5c6d2e07b8e8f82801d8e8c4445fefd
Headers show
Series more -Wunused-parameter annotations | expand

Commit Message

Jeff King July 3, 2023, 6:44 a.m. UTC
We don't look at the "flags" parameter, which is natural for something
that is just printing the contents of the replace refs. But let's mark
it to appease -Wunused-parameter.

This probably should have been part of 63e14ee2d6 (refs: mark unused
each_ref_fn parameters, 2022-08-19), but I missed it as this one is a
repo_each_ref_fn, which takes an extra repository argument.

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

Patch

diff --git a/builtin/replace.c b/builtin/replace.c
index 9ceaa25233..17b75229d2 100644
--- a/builtin/replace.c
+++ b/builtin/replace.c
@@ -49,7 +49,7 @@  struct show_data {
 
 static int show_reference(struct repository *r, const char *refname,
 			  const struct object_id *oid,
-			  int flag, void *cb_data)
+			  int flag UNUSED, void *cb_data)
 {
 	struct show_data *data = cb_data;