Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/fsck.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-07-03 09:44:18 +0300
committerJunio C Hamano <gitster@pobox.com>2023-07-14 03:24:00 +0300
commit0b4e9013f1f23f0ee0758b2c6abfc446b1376bb0 (patch)
tree1dafc5dfad5e77fd71ebafcbf41d2508d1fc10d3 /fsck.c
parentcc88afad622b8166563cc6bd68de3155ec558ab0 (diff)
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 'fsck.c')
-rw-r--r--fsck.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fsck.c b/fsck.c
index 3be86616c5..8852e56f6b 100644
--- a/fsck.c
+++ b/fsck.c
@@ -1310,9 +1310,9 @@ int fsck_buffer(const struct object_id *oid, enum object_type type,
int fsck_error_function(struct fsck_options *o,
const struct object_id *oid,
- enum object_type object_type,
+ enum object_type object_type UNUSED,
enum fsck_msg_type msg_type,
- enum fsck_msg_id msg_id,
+ enum fsck_msg_id msg_id UNUSED,
const char *message)
{
if (msg_type == FSCK_WARN) {