Skip to content

Commit

Permalink
mkdeps: Use %zu/%zd printf format instead of casts
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt authored and xiaoxiang781216 committed Jun 3, 2020
1 parent 1688440 commit 44585ee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tools/mkdeps.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,7 @@ static const char *do_shquote(const char *argument)
{
fprintf(stderr,
"ERROR: Truncated during shquote string is too long"
"[%lu/%zu]\n", (unsigned long)strlen(argument),
sizeof(g_shquote));
"[%zu/%zu]\n", strlen(argument), sizeof(g_shquote));
exit(EXIT_FAILURE);
}

Expand Down Expand Up @@ -590,7 +589,7 @@ static const char *do_expand(const char *argument)
{
fprintf(stderr,
"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);
}

Expand Down Expand Up @@ -662,8 +661,7 @@ static const char *convert_path(const char *path)
NULL, 0);
if (size > (MAX_PATH - 3))
{
fprintf(stderr, "# ERROR: POSIX path too long: %lu\n",
(unsigned long)size);
fprintf(stderr, "# ERROR: POSIX path too long: %zd\n", size);
exit(EXIT_FAILURE);
}

Expand Down

0 comments on commit 44585ee

Please sign in to comment.