diff options
author | Jeff King <peff@peff.net> | 2023-07-03 06:44:18 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-07-14 00:24:00 (GMT) |
commit | 0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0 (patch) | |
tree | 1dafc5dfad5e77fd71ebafcbf41d2508d1fc10d3 /builtin/index-pack.c | |
parent | cc88afad622b8166563cc6bd68de3155ec558ab0 (diff) | |
download | git-0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0.zip git-0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0.tar.gz git-0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0.tar.bz2 |
fsck: mark unused parameters in various fsck callbacks
There are a few callback functions which are used with the fsck code,
but it's natural that not all callbacks need all parameters. For
reporting, even something as obvious as "the oid of the object which had
a problem" is not always used, as some callers are only checking a
single object in the first place. And for both reporting and walking,
things like void data pointers and the fsck_options aren't always
necessary.
But since each such parameter is used by _some_ callback, we have to
keep them in the interface. Mark the unused ones in specific callbacks
to avoid triggering -Wunused-parameter.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r-- | builtin/index-pack.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index e280180..3f74364 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -223,7 +223,8 @@ static void cleanup_thread(void) } static int mark_link(struct object *obj, enum object_type type, - void *data, struct fsck_options *options) + void *data UNUSED, + struct fsck_options *options UNUSED) { if (!obj) return -1; |