]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/helper: mark more unused argv/argc arguments
authorJeff King <peff@peff.net>
Sat, 17 Aug 2024 08:22:52 +0000 (04:22 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sat, 17 Aug 2024 16:46:11 +0000 (09:46 -0700)
This is a continuation of 126e3b3d2a (t/helper: mark unused argv/argc
arguments, 2023-03-28) to cover a few new cases:

 - test-example-tap was added since that commit

 - test-hashmap used to accept the "ignorecase" argument on the command
   line. But since most of its logic was moved to a unit-test in
   3469a23659 (t: port helper/test-hashmap.c to unit-tests/t-hashmap.c,
   2024-08-03), it now ignores its argv entirely.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-example-tap.c
t/helper/test-hashmap.c

index d072ad559f64f71823f25462832eb7bc53864828..f35667bd29843d6e8b2a87f51018639b41729d22 100644 (file)
@@ -70,7 +70,7 @@ static void t_empty(void)
        ; /* empty */
 }
 
-int cmd__example_tap(int argc, const char **argv)
+int cmd__example_tap(int argc UNUSED, const char **argv UNUSED)
 {
        test_res = TEST(check_res = check_int(1, ==, 1), "passing test");
        TEST(t_res(1), "passing test and assertion return 1");
index 195e6278be34d7c2eb9f72383103c334f4211c26..7782ae585e6471df087d895629e1e111138e9dce 100644 (file)
@@ -138,7 +138,7 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
  *
  * perfhashmap method rounds -> test hashmap.[ch] performance
  */
-int cmd__hashmap(int argc, const char **argv)
+int cmd__hashmap(int argc UNUSED, const char **argv UNUSED)
 {
        struct string_list parts = STRING_LIST_INIT_NODUP;
        struct strbuf line = STRBUF_INIT;