Skip to content

Commit 1e9cb34

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cc2f810 commit 1e9cb34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/helper/test-dump-split-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include "split-index.h"
88
#include "ewah/ewok.h"
99

10-
static void show_bit(size_t pos, void *data)
10+
static void show_bit(size_t pos, void *data UNUSED)
1111
{
1212
printf(" %d", (int)pos);
1313
}

t/helper/test-oid-array.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "setup.h"
55
#include "strbuf.h"
66

7-
static int print_oid(const struct object_id *oid, void *data)
7+
static int print_oid(const struct object_id *oid, void *data UNUSED)
88
{
99
puts(oid_to_hex(oid));
1010
return 0;

0 commit comments

Comments
 (0)