Skip to content

Commit 7046c85

Browse files
peffgitster
authored andcommitted
t/helper: mark more unused argv/argc arguments
This is a continuation of 126e3b3 (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 3469a23 (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4350676 commit 7046c85

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/helper/test-example-tap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static void t_empty(void)
7070
; /* empty */
7171
}
7272

73-
int cmd__example_tap(int argc, const char **argv)
73+
int cmd__example_tap(int argc UNUSED, const char **argv UNUSED)
7474
{
7575
test_res = TEST(check_res = check_int(1, ==, 1), "passing test");
7676
TEST(t_res(1), "passing test and assertion return 1");

t/helper/test-hashmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static void perf_hashmap(unsigned int method, unsigned int rounds)
138138
*
139139
* perfhashmap method rounds -> test hashmap.[ch] performance
140140
*/
141-
int cmd__hashmap(int argc, const char **argv)
141+
int cmd__hashmap(int argc UNUSED, const char **argv UNUSED)
142142
{
143143
struct string_list parts = STRING_LIST_INIT_NODUP;
144144
struct strbuf line = STRBUF_INIT;

0 commit comments

Comments
 (0)