[PATCH] common: fix 'dummy' is used uninitialized in this function warning

Fabio Porcedda Fabio.Porcedda at telit.com
Fri Dec 10 05:47:47 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.3



More information about the barebox mailing list