[PATCH 02/14] do_for_each_ref_helper(): mark unused repository parameter
- From
Jeff King <peff@peff.net>
- Date
- Jul 3, 2023, 06:44 UTC
- Message-ID
- <20230703064402.GB3537614@coredump.intra.peff.net>
- In-Reply-To
- <20230703064347.GA3524892@coredump.intra.peff.net>
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> --- refs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/refs.c b/refs.c index c029f64982..edeae90ebb 100644 --- a/refs.c +++ b/refs.c @@ -1588,7 +1588,7 @@ struct do_for_each_ref_help { void *cb_data; }; -static int do_for_each_ref_helper(struct repository *r, +static int do_for_each_ref_helper(struct repository *r UNUSED, const char *refname, const struct object_id *oid, int flags,
-- 2.41.0.586.g3c0cc15bc7