From df9d638c24562707d18f0ac1836abc99c8541176 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Sat, 17 Aug 2024 04:23:09 -0400 Subject: unit-tests: ignore unused argc/argv All of the unit test programs have their own cmd_main() function, but none of them actually look at the argc/argv that is passed in. In the long run we may want them to handle options for the test harness. But we'd probably do that with a shared harness cmd_main(), dispatching to the individual tests. In the meantime, let's annotate the unused parameters to avoid triggering -Wunused-parameter. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- t/unit-tests/t-strcmp-offset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 't/unit-tests/t-strcmp-offset.c') diff --git a/t/unit-tests/t-strcmp-offset.c b/t/unit-tests/t-strcmp-offset.c index fe4c2706b1..6880f21161 100644 --- a/t/unit-tests/t-strcmp-offset.c +++ b/t/unit-tests/t-strcmp-offset.c @@ -24,7 +24,7 @@ static void check_strcmp_offset(const char *string1, const char *string2, expect_offset), \ "strcmp_offset(%s, %s) works", #string1, #string2) -int cmd_main(int argc, const char **argv) +int cmd_main(int argc UNUSED, const char **argv UNUSED) { TEST_STRCMP_OFFSET("abc", "abc", 0, 3); TEST_STRCMP_OFFSET("abc", "def", -1, 0); -- cgit v1.2.3