[PATCH v2] xyzModem.c: fix 'dummy' is used uninitialized in this function warning

Fabio Porcedda fabio.porcedda at telit.com
Mon Dec 20 09:14:37 EST 2010


fix this gcc 4.4 warning:

xyzModem.c: In function 'xyzModem_stream_open':
xyzModem.c:564: warning: 'dummy' is used uninitialized in this function

Copied from U-Boot

Signed-off-by: Fabio Porcedda <fabio.porcedda at telit.com>
---
 commands/xyzModem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/commands/xyzModem.c b/commands/xyzModem.c
index 1dd255d..71d7d68 100644
--- a/commands/xyzModem.c
+++ b/commands/xyzModem.c
@@ -492,7 +492,7 @@ int xyzModem_stream_open(connection_info_t *info, int *err)
 			       xyzModem_CHAR_TIMEOUT);
 #else
 /* TODO: CHECK ! */
-	int dummy;
+	int dummy = 0;
 	xyz.__chan = &dummy;
 #endif
 	xyz.len = 0;
-- 
1.7.3.4

Changes for v2:
   - fixed commit log message



More information about the barebox mailing list