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 --- object-file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'object-file.c') diff --git a/object-file.c b/object-file.c index 8d87720dd5..68a2397e33 100644 --- a/object-file.c +++ b/object-file.c @@ -2308,11 +2308,11 @@ int repo_has_object_file(struct repository *r, * report the minimal fsck error here, and rely on the caller to * give more context. */ -static int hash_format_check_report(struct fsck_options *opts, - const struct object_id *oid, - enum object_type object_type, - enum fsck_msg_type msg_type, - enum fsck_msg_id msg_id, +static int hash_format_check_report(struct fsck_options *opts UNUSED, + const struct object_id *oid UNUSED, + enum object_type object_type UNUSED, + enum fsck_msg_type msg_type UNUSED, + enum fsck_msg_id msg_id UNUSED, const char *message) { error(_("object fails fsck: %s"), message); -- cgit v1.2.3