summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-08-19 06:08:32 -0400
committerJunio C Hamano <gitster@pobox.com>2022-08-19 12:18:54 -0700
commit63e14ee2d69b58eae72e34df81f2cde145427037 (patch)
treefb936eb4980e58b3618a5535f3cd60f5e98bfc56 /builtin/pack-objects.c
parent9b240347543f240dbf7e541173ac45c34155ca1b (diff)
downloadgit-63e14ee2d69b58eae72e34df81f2cde145427037.tar.gz
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 <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/pack-objects.c')
-rw-r--r--builtin/pack-objects.c12
1 files changed, 7 insertions, 5 deletions
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;