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

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

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;