You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/06/03 10:30:46 UTC
[incubator-nuttx] 02/02: mkdeps: Use %zu/%zd printf format instead
of casts
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 44585eeaf85693a5e1e4097dd17c5c15058ca733
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Jun 3 17:30:58 2020 +0900
mkdeps: Use %zu/%zd printf format instead of casts
---
tools/mkdeps.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/tools/mkdeps.c b/tools/mkdeps.c
index 2adf3b7..867c0be 100644
--- a/tools/mkdeps.c
+++ b/tools/mkdeps.c
@@ -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);
}
@@ -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);
}
@@ -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);
}