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/11/15 01:49:30 UTC

[incubator-nuttx-apps] 05/05: examples/romfs/romfs_main.c: Fix a printf format warning

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-apps.git

commit c408462892a112ff94f10f25b7870e2b3e94f6b6
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 14 08:54:51 2020 +0900

    examples/romfs/romfs_main.c: Fix a printf format warning
---
 examples/romfs/romfs_main.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/examples/romfs/romfs_main.c b/examples/romfs/romfs_main.c
index da9f428..80e9b11 100644
--- a/examples/romfs/romfs_main.c
+++ b/examples/romfs/romfs_main.c
@@ -60,7 +60,9 @@
 #include <sys/mount.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
+#include <inttypes.h>
 #include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -274,7 +276,8 @@ static void checkattributes(const char *path, mode_t mode, size_t size)
 
   if (size != buf.st_size)
     {
-      printf("  -- ERROR: Expected size %d, got %d\n", mode, buf.st_size);
+      printf("  -- ERROR: Expected size %zu, got %ju\n", size,
+             (uintmax_t)buf.st_size);
       g_nerrors++;
     }
 }