aboutsummaryrefslogtreecommitdiffstats
path: root/t/unit-tests
diff options
context:
space:
mode:
authorRené Scharfe <l.s.r@web.de>2024-07-16 18:14:35 +0200
committerJunio C Hamano <gitster@pobox.com>2024-07-16 09:30:30 -0700
commit78687168bcaeabd3bdcaa1849dc9dc7d3a6f02db (patch)
tree38f8a1ddfc4f5e393eb8685fdc8067c4b53f6f4d /t/unit-tests
parent141e13ee1ada7b0c469f843cf3c8bfd5a4b3fa78 (diff)
downloadgit-78687168bcaeabd3bdcaa1849dc9dc7d3a6f02db.tar.gz
t-strvec: fix type mismatch in check_strvec
Cast i from size_t to uintmax_t to match the format string. Reported-by: Jeff King <peff@peff.net> Signed-off-by: René Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests')
-rw-r--r--t/unit-tests/t-strvec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/unit-tests/t-strvec.c b/t/unit-tests/t-strvec.c
index fdb28ba220..fa1a041469 100644
--- a/t/unit-tests/t-strvec.c
+++ b/t/unit-tests/t-strvec.c
@@ -11,7 +11,8 @@
check_uint((vec)->nr, <=, (vec)->alloc)) { \
for (size_t i = 0; i < ARRAY_SIZE(expect); i++) { \
if (!check_str((vec)->v[i], expect[i])) { \
- test_msg(" i: %"PRIuMAX, i); \
+ test_msg(" i: %"PRIuMAX, \
+ (uintmax_t)i); \
break; \
} \
} \