do_for_each_ref_helper(): mark unused repository parameter

This function gets a repository parameter because it's a callback for do_for_each_repo_ref_iterator(). But it's just a wrapper that passes along each call to a regular each_ref_fn callback, and the latter doesn't accept a repository argument. Probably in the long run all of the each_ref_fn callbacks should get a repository parameter, too. But changing that now would require updates all over the code base. Until that happens, let's annotate this wrapper callback to quiet the compiler's -Wunused-parameter warning. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Jul 3, 2023 at 02:44 UTC 1779deed39e68b8eab886aba8d9a903905e42cf3
1 file changed +1 -1
refs.c
+1 -1
@@ -1588,7 +1588,7 @@ struct do_for_each_ref_help {
1588 void *cb_data;
1589 };
1590
1591 -static int do_for_each_ref_helper(struct repository *r,
1591 +static int do_for_each_ref_helper(struct repository *r UNUSED,
1592 const char *refname,
1593 const struct object_id *oid,
1594 int flags,