]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/helper: mark unused callback void data parameters
authorJeff King <peff@peff.net>
Mon, 3 Jul 2023 06:44:36 +0000 (02:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 00:24:00 +0000 (17:24 -0700)
Many callback interfaces have an extra void data parameter, but we don't
always need it (especially for dumping functions like the ones in test
helpers). Mark them as unused to avoid -Wunused-parameter warnings.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-dump-split-index.c
t/helper/test-oid-array.c

index 5cf0b26dca1f397a6e7b2d6662ec669583d35a66..f29d18ef9490b7a0dd8fd689082a68b4cd5332b0 100644 (file)
@@ -7,7 +7,7 @@
 #include "split-index.h"
 #include "ewah/ewok.h"
 
-static void show_bit(size_t pos, void *data)
+static void show_bit(size_t pos, void *data UNUSED)
 {
        printf(" %d", (int)pos);
 }
index eef68833b7fb0607eebf336e1ee9627aed7390d8..aafe398ef07e538ef774fedc72cd27189391f2fb 100644 (file)
@@ -4,7 +4,7 @@
 #include "setup.h"
 #include "strbuf.h"
 
-static int print_oid(const struct object_id *oid, void *data)
+static int print_oid(const struct object_id *oid, void *data UNUSED)
 {
        puts(oid_to_hex(oid));
        return 0;