From 63e14ee2d69b58eae72e34df81f2cde145427037 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 19 Aug 2022 06:08:32 -0400 Subject: refs: mark unused each_ref_fn parameters Functions used with for_each_ref(), etc, need to conform to the each_ref_fn interface. But most of them don't need every parameter; let's annotate the unused ones to quiet -Wunused-parameter. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin/pack-objects.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'builtin/pack-objects.c') diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 39e28cfcaf..eb93e5c8fe 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -759,8 +759,8 @@ static enum write_one_status write_one(struct hashfile *f, return WRITE_ONE_WRITTEN; } -static int mark_tagged(const char *path, const struct object_id *oid, int flag, - void *cb_data) +static int mark_tagged(const char *UNUSED(path), const struct object_id *oid, + int UNUSED(flag), void *UNUSED(cb_data)) { struct object_id peeled; struct object_entry *entry = packlist_find(&to_pack, oid); @@ -3035,7 +3035,8 @@ static void add_tag_chain(const struct object_id *oid) } } -static int add_ref_tag(const char *tag, const struct object_id *oid, int flag, void *cb_data) +static int add_ref_tag(const char *UNUSED(tag), const struct object_id *oid, + int UNUSED(flag), void *UNUSED(cb_data)) { struct object_id peeled; @@ -3950,8 +3951,9 @@ static void record_recent_commit(struct commit *commit, void *data) } static int mark_bitmap_preferred_tip(const char *refname, - const struct object_id *oid, int flags, - void *_data) + const struct object_id *oid, + int UNUSED(flags), + void *UNUSED(data)) { struct object_id peeled; struct object *object; -- cgit v1.2.3