From: René Scharfe Date: Tue, 16 Jul 2024 16:14:35 +0000 (+0200) Subject: t-strvec: fix type mismatch in check_strvec X-Git-Tag: v2.47.0-rc0~178^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=78687168bcaeabd3bdcaa1849dc9dc7d3a6f02db;p=thirdparty%2Fgit.git 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 Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- 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; \ } \ } \