Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-07-03 09:44:02 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-14 03:23:59 +0300
commit1779deed39e68b8eab886aba8d9a903905e42cf3 (patch)
tree0b5d476933a9942f0a02ff56ec547e16ed3ce771 /refs.c
parentb8ef49d54c83c1dfa7026bad47b315f16bb9c16a (diff)
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>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c2
1 files changed, 1 insertions, 1 deletions
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,