From 0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 3 Jul 2023 02:44:18 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/unpack-objects.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin/unpack-objects.c') diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c index 1979532a9d..558b8485ba 100644 --- a/builtin/unpack-objects.c +++ b/builtin/unpack-objects.c @@ -214,7 +214,8 @@ static void write_cached_object(struct object *obj, struct obj_buffer *obj_buf) * Verify its reachability and validity recursively and write it out. */ static int check_object(struct object *obj, enum object_type type, - void *data, struct fsck_options *options) + void *data UNUSED, + struct fsck_options *options UNUSED) { struct obj_buffer *obj_buf; -- cgit v1.3