]> git.ipfire.org Git - thirdparty/git.git/commitdiff
replace: mark unused parameter in ref callback
authorJeff King <peff@peff.net>
Mon, 3 Jul 2023 06:44:25 +0000 (02:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 00:24:00 +0000 (17:24 -0700)
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>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/replace.c

index 9ceaa2523308f0ea7f3269ebf6afe0dfbc673148..17b75229d2242d292ec1296d234f0479fc9c9fd7 100644 (file)
@@ -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;