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 2021/07/04 04:21:22 UTC

[incubator-nuttx-apps] 03/03: examples/configdata: Fix some printf format warnings

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 931a873d047081297a9e7184e5349e0fb324d294
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 09:08:39 2021 +0900

    examples/configdata: Fix some printf format warnings
    
    Fix some printf format warnings by -Wformat.
---
 examples/configdata/configdata_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/examples/configdata/configdata_main.c b/examples/configdata/configdata_main.c
index 700b864..6d230b2 100644
--- a/examples/configdata/configdata_main.c
+++ b/examples/configdata/configdata_main.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -378,7 +379,8 @@ static inline int
   crc = crc32(g_entryimage, entry->len);
   if (crc != entry->crc)
     {
-      printf("ERROR: Bad CRC: %u vs %u\n", crc, entry->crc);
+      printf("ERROR: Bad CRC: %" PRIu32 " vs %" PRIu32 "\n",
+             crc, entry->crc);
       printf("  Entry id:   %04X\n", entry->id);
       printf("  Entry size: %d\n", entry->len);
       return ERROR;