t/helper: mark unused callback void data parameters

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>
maint
Jeff King 2023-07-03 02:44:36 -04:00 committed by Junio C Hamano
parent cc2f810172
commit 1e9cb3487a
2 changed files with 2 additions and 2 deletions

View 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);
}

View 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;