You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/11/13 13:55:36 UTC

[incubator-nuttx-apps] branch master updated (46fac8c85 -> da30a87b8)

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

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


    from 46fac8c85 Fix CI crash because switch() as missing NMEA sentences
     new 8094ced13 Fix Error: slcan.c:265:19: error: variable 'reccount' is uninitialized when used here [-Werror,-Wuninitialized]
     new dd5dbde62 Fix Error: slcan.c:266:60: error: format specifies type 'unsigned long' but the argument has type 'canid_t' (aka 'unsigned int') [-Werror,-Wformat]
     new bf03439d1 Fix Error: src/wapi.c:1050:14: error: implicit conversion from enumeration type 'enum wapi_mode_e' to different enumeration type 'enum wapi_pta_prio_e' [-Werror,-Wenum-conversion]
     new 25f200e9b Fix Error: sx127x_demo.c:464:7: error: variable 'fd' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
     new da30a87b8 Fix Error: version_main.c:124:42: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

The 5 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:
 canutils/slcan/slcan.c                    | 11 +++++++----
 examples/mcuboot/swap_test/version_main.c |  7 +++----
 examples/sx127x_demo/sx127x_demo.c        |  4 ++--
 wireless/wapi/src/wapi.c                  |  3 ++-
 4 files changed, 14 insertions(+), 11 deletions(-)


[incubator-nuttx-apps] 05/05: Fix Error: version_main.c:124:42: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit da30a87b81f35b9ee21cbe0027853293016691e5
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 19:10:48 2022 +0800

    Fix Error: version_main.c:124:42: error: format specifies type 'long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 examples/mcuboot/swap_test/version_main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/examples/mcuboot/swap_test/version_main.c b/examples/mcuboot/swap_test/version_main.c
index 932112493..fbe04e362 100644
--- a/examples/mcuboot/swap_test/version_main.c
+++ b/examples/mcuboot/swap_test/version_main.c
@@ -118,10 +118,9 @@ int main(int argc, FAR char *argv[])
       return rc;
     }
 
-  printf("Image version %d.%d.%d.%ld\n", raw_header.version.major,
-                                         raw_header.version.minor,
-                                         raw_header.version.revision,
-                                         raw_header.version.build_num);
+  printf("Image version %d.%d.%d.%" PRId32 "\n",
+          raw_header.version.major, raw_header.version.minor,
+          raw_header.version.revision, raw_header.version.build_num);
 
   return 0;
 }


[incubator-nuttx-apps] 04/05: Fix Error: sx127x_demo.c:464:7: error: variable 'fd' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 25f200e9b00978c364dcce34b433d1257af3117c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 11:10:26 2022 +0800

    Fix Error: sx127x_demo.c:464:7: error: variable 'fd' is used uninitialized whenever 'if' condition is true [-Werror,-Wsometimes-uninitialized]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 examples/sx127x_demo/sx127x_demo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/sx127x_demo/sx127x_demo.c b/examples/sx127x_demo/sx127x_demo.c
index 50b4ee7de..3c586f4d4 100644
--- a/examples/sx127x_demo/sx127x_demo.c
+++ b/examples/sx127x_demo/sx127x_demo.c
@@ -464,7 +464,7 @@ int main(int argc, FAR char *argv[])
   if (ret != OK)
     {
       printf("sx127x_main: validate arguments failed!\n");
-      goto errout;
+      return 0;
     }
 
   printf("Start sx127x_demo\n");
@@ -476,7 +476,7 @@ int main(int argc, FAR char *argv[])
     {
       int errcode = errno;
       printf("ERROR: Failed to open device %s: %d\n", DEV_NAME, errcode);
-      goto errout;
+      return 0;
     }
 
   /* Set modulation */


[incubator-nuttx-apps] 02/05: Fix Error: slcan.c:266:60: error: format specifies type 'unsigned long' but the argument has type 'canid_t' (aka 'unsigned int') [-Werror,-Wformat]

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit dd5dbde620b04d2de3ad3182a7b1da293808c06b
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 09:58:57 2022 +0800

    Fix Error: slcan.c:266:60: error: format specifies type 'unsigned long' but the argument has type 'canid_t' (aka 'unsigned int') [-Werror,-Wformat]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 canutils/slcan/slcan.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/canutils/slcan/slcan.c b/canutils/slcan/slcan.c
index e67a05de6..dbe8cf54b 100644
--- a/canutils/slcan/slcan.c
+++ b/canutils/slcan/slcan.c
@@ -263,20 +263,23 @@ int main(int argc, char *argv[])
               if (nbytes == CAN_MTU)
                 {
                   reccount++;
-                  debug_print("R%d, Id:0x%lX\n", reccount, frame.can_id);
+                  debug_print("R%d, Id:0x%" PRIx32 "\n",
+                              reccount, frame.can_id);
                   if (frame.can_id & CAN_EFF_FLAG)
                     {
                       /* 29 bit address */
 
                       frame.can_id = frame.can_id & ~CAN_EFF_FLAG;
-                      sprintf(sbuf, "T%08lX%d", frame.can_id, frame.len);
+                      sprintf(sbuf, "T%08" PRIx32 "%d",
+                              frame.can_id, frame.len);
                       sbp = &sbuf[10];
                     }
                   else
                     {
                       /* 11 bit address */
 
-                      sprintf(sbuf, "t%03lX%d", frame.can_id, frame.len);
+                      sprintf(sbuf, "t%03" PRIx32 "%d",
+                              frame.can_id, frame.len);
                       sbp = &sbuf[5];
                     }
 


[incubator-nuttx-apps] 01/05: Fix Error: slcan.c:265:19: error: variable 'reccount' is uninitialized when used here [-Werror,-Wuninitialized]

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8094ced139c27bc3af4bebbea445f8c584acd18e
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 09:55:11 2022 +0800

    Fix Error: slcan.c:265:19: error: variable 'reccount' is uninitialized when used here [-Werror,-Wuninitialized]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 canutils/slcan/slcan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/canutils/slcan/slcan.c b/canutils/slcan/slcan.c
index 2bf1ef133..e67a05de6 100644
--- a/canutils/slcan/slcan.c
+++ b/canutils/slcan/slcan.c
@@ -193,7 +193,7 @@ int main(int argc, char *argv[])
   int nbytes;
   int i;
   int ret;
-  int reccount;
+  int reccount = 0;
   struct sockaddr_can addr;
   struct canfd_frame frame;
   struct msghdr msg;


[incubator-nuttx-apps] 03/05: Fix Error: src/wapi.c:1050:14: error: implicit conversion from enumeration type 'enum wapi_mode_e' to different enumeration type 'enum wapi_pta_prio_e' [-Werror,-Wenum-conversion]

Posted by pk...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit bf03439d1ba6288464f413c631e5dcfaec501d3f
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Nov 13 10:59:52 2022 +0800

    Fix Error: src/wapi.c:1050:14: error: implicit conversion from enumeration type 'enum wapi_mode_e' to different enumeration type 'enum wapi_pta_prio_e' [-Werror,-Wenum-conversion]
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 wireless/wapi/src/wapi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wireless/wapi/src/wapi.c b/wireless/wapi/src/wapi.c
index 191cc4b97..84a5b9ee5 100644
--- a/wireless/wapi/src/wapi.c
+++ b/wireless/wapi/src/wapi.c
@@ -1047,7 +1047,8 @@ static int wapi_pta_prio_cmd(int sock, int argc, FAR char **argv)
 
   /* Convert input strings to values */
 
-  pta_prio = (enum wapi_mode_e)wapi_str2ndx(argv[1], g_wapi_pta_prio_flags);
+  pta_prio = (enum wapi_pta_prio_e)
+    wapi_str2ndx(argv[1], g_wapi_pta_prio_flags);
 
   /* Set operating mode */