Skip to contentSkip to conversation

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

PATCH New Kim Phillips 2 participants 2 messages Jun 15, 2009 – Jul 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 common: fix 'dummy' is used uninitialized in this function warning

fix this gcc 4.4 warning:

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

---
 common/xyzModem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
common/xyzModem.c +1 -1
index a209dfa..7a46805 100644
@@ -544,7 +544,7 @@ 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;
Signature · 1 line
1.6.3.2
#1 lore raw

PATCH 1/1 common: fix 'dummy' is used uninitialized in this function warning

Dear Kim Phillips,

Quoted 9 lines · In message <[email protected]> you wrote:

fix this gcc 4.4 warning:

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

---
 common/xyzModem.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I perceive a possibility of an immediate  chronological  sequence  of
events which includes a violence.
                        - Terry Pratchett, _The Dark Side of the Sun_