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:19 UTC

[incubator-nuttx-apps] branch master updated (0dc9be9 -> 931a873)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git.


    from 0dc9be9  graphics/pdcurs34: Fix a compile warning
     new 814f105  examples/bmi160: Fix printf format warning
     new 4afa1f1  examples/charger: Fix some printf format warnings
     new 931a873  examples/configdata: Fix some printf format warnings

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 examples/bmi160/sixaxis_main.c        | 3 ++-
 examples/charger/charger_main.c       | 4 ++--
 examples/configdata/configdata_main.c | 4 +++-
 3 files changed, 7 insertions(+), 4 deletions(-)

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

Posted by xi...@apache.org.
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;

[incubator-nuttx-apps] 01/03: examples/bmi160: Fix printf format warning

Posted by xi...@apache.org.
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 814f10544e0919c3ef8971d2744e5ec37b8bfeab
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 09:05:42 2021 +0900

    examples/bmi160: Fix printf format warning
    
    Fix printf format warning by -Wformat.
---
 examples/bmi160/sixaxis_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/bmi160/sixaxis_main.c b/examples/bmi160/sixaxis_main.c
index d798ab7..195ad81 100644
--- a/examples/bmi160/sixaxis_main.c
+++ b/examples/bmi160/sixaxis_main.c
@@ -38,6 +38,7 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <inttypes.h>
 #include <fcntl.h>
 #include <stdio.h>
 
@@ -86,7 +87,7 @@ int main(int argc, FAR char *argv[])
 
       if (prev != data.sensor_time)
         {
-          printf("[%d] %d, %d, %d / %d, %d, %d\n",
+          printf("[%" PRIu32 "] %d, %d, %d / %d, %d, %d\n",
                  data.sensor_time,
                  data.gyro.x, data.gyro.y, data.gyro.z,
                  data.accel.x, data.accel.y, data.accel.z);

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

Posted by xi...@apache.org.
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 4afa1f1514ca8be0377053662c14ad96db526b43
Author: SPRESENSE <41...@users.noreply.github.com>
AuthorDate: Sun Jul 4 09:06:57 2021 +0900

    examples/charger: Fix some printf format warnings
    
    Fix some printf format warnings by -Wformat.
---
 examples/charger/charger_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/charger/charger_main.c b/examples/charger/charger_main.c
index 038a674..ef91abc 100644
--- a/examples/charger/charger_main.c
+++ b/examples/charger/charger_main.c
@@ -244,8 +244,8 @@ int main(int argc, FAR char *argv[])
     }
 
   gettimeofday(&tv, NULL);
-  printf("%d.%06d: %d mV, %d mA\n",
-         tv.tv_sec, tv.tv_usec, voltage, current);
+  printf("%ju.%06ld: %d mV, %d mA\n",
+         (uintmax_t)tv.tv_sec, tv.tv_usec, voltage, current);
 
   close(fd);