From: Thomas Weißschuh Date: Sun, 12 Apr 2026 06:08:37 +0000 (+0200) Subject: strutils: fix printf formats X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8612e465f4f4720d6b5d68f9b73c02deda0d0db;p=thirdparty%2Futil-linux.git strutils: fix printf formats Use the correct printf format placeholders for uint64_t and int64_t. Signed-off-by: Thomas Weißschuh --- diff --git a/lib/strutils.c b/lib/strutils.c index 0fce3c7c6..9b2aec94e 100644 --- a/lib/strutils.c +++ b/lib/strutils.c @@ -1513,10 +1513,10 @@ int main(int argc, char *argv[]) return test_strutils_normalize(argc - 1, argv + 1); } else if (argc == 3 && strcmp(argv[1], "--strtos64") == 0) { - printf("'%s'-->%jd\n", argv[2], strtos64_or_err(argv[2], "strtos64 failed")); + printf("'%s'-->%"PRId64"\n", argv[2], strtos64_or_err(argv[2], "strtos64 failed")); return EXIT_SUCCESS; } else if (argc == 3 && strcmp(argv[1], "--strtou64") == 0) { - printf("'%s'-->%ju\n", argv[2], strtou64_or_err(argv[2], "strtou64 failed")); + printf("'%s'-->%"PRIu64"\n", argv[2], strtou64_or_err(argv[2], "strtou64 failed")); return EXIT_SUCCESS; } else if (argc == 3 && strcmp(argv[1], "--strtos32") == 0) { printf("'%s'-->%d\n", argv[2], strtos32_or_err(argv[2], "strtos32 failed"));