mkdeps: Use %zu/%zd printf format instead of casts

This commit is contained in:
YAMAMOTO Takashi 2020-06-03 17:30:58 +09:00 committed by Xiang Xiao
parent 16884407eb
commit 44585eeaf8

View File

@ -352,8 +352,7 @@ static const char *do_shquote(const char *argument)
{ {
fprintf(stderr, fprintf(stderr,
"ERROR: Truncated during shquote string is too long" "ERROR: Truncated during shquote string is too long"
"[%lu/%zu]\n", (unsigned long)strlen(argument), "[%zu/%zu]\n", strlen(argument), sizeof(g_shquote));
sizeof(g_shquote));
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -590,7 +589,7 @@ static const char *do_expand(const char *argument)
{ {
fprintf(stderr, fprintf(stderr,
"ERROR: Truncated during expansion string is too long" "ERROR: Truncated during expansion string is too long"
"[%lu/%u]\n", (unsigned long)strlen(argument), MAX_EXPAND); "[%zu/%u]\n", strlen(argument), MAX_EXPAND);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@ -662,8 +661,7 @@ static const char *convert_path(const char *path)
NULL, 0); NULL, 0);
if (size > (MAX_PATH - 3)) if (size > (MAX_PATH - 3))
{ {
fprintf(stderr, "# ERROR: POSIX path too long: %lu\n", fprintf(stderr, "# ERROR: POSIX path too long: %zd\n", size);
(unsigned long)size);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }