Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdeps: Quote CFLAGS to be safe with the shell #1183

Merged
merged 2 commits into from
Jun 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
mkdeps: Use %zu/%zd printf format instead of casts
  • Loading branch information
yamt committed Jun 3, 2020
commit 4bc8c36ee629ee5f958ea91b8f5b58ddbaaffbf6
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