public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix possible uninitialized variable compiler warning.
@ 2006-10-10  6:23 Grant Likely
  2006-10-10  7:05 ` Wolfgang Denk
  2006-10-11 21:02 ` Matthew McClintock
  0 siblings, 2 replies; 21+ messages in thread
From: Grant Likely @ 2006-10-10  6:23 UTC (permalink / raw)
  To: u-boot

This patch applies against the u-boot tree at
git://www.jdl.com/software/u-boot-86xx.git

When CONFIG_OF_FLAG_TREE is set, the compiler complains that 'len' in
do_bootm_linux() may be uninitialized.  There is no possibility in the
current code that len will get used uninitialized, but this fix follows
the existing convention of setting both len and data to zero at the same
time.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---
 common/cmd_bootm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 652d843..af949a3 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -623,7 +623,7 @@ #ifdef CONFIG_OF_FLAT_TREE
 	/* Look for a '-' which indicates to ignore the ramdisk argument */
 	if (argc >= 3 && strcmp(argv[2], "-") ==  0) {
 			debug ("Skipping initrd\n");
-			data = 0;
+			len = data = 0;
 		}
 	else
 #endif
-- 
1.4.2.rc2.g822a

^ permalink raw reply related	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-10-13  0:13 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-10  6:23 [U-Boot-Users] [PATCH] Fix possible uninitialized variable compiler warning Grant Likely
2006-10-10  7:05 ` Wolfgang Denk
2006-10-10  7:13   ` Grant Likely
2006-10-10  8:58     ` Wolfgang Denk
2006-10-11  6:09       ` Grant Likely
2006-10-11  7:44         ` Wolfgang Denk
2006-10-11 15:30           ` Grant Likely
2006-10-11 17:14             ` Haavard Skinnemoen
2006-10-11 20:10             ` Wolfgang Denk
2006-10-12 19:08               ` Grant Likely
2006-10-12 20:26                 ` Wolfgang Denk
2006-10-12 20:51                   ` Grant Likely
2006-10-13  0:13                     ` Wolfgang Denk
2006-10-11 18:22       ` Matthew McClintock
2006-10-11 18:29         ` Grant Likely
2006-10-11 20:34         ` Wolfgang Denk
2006-10-11 21:02 ` Matthew McClintock
2006-10-11 21:55   ` Wolfgang Denk
2006-10-11 22:04   ` Wolfgang Denk
2006-10-12  6:27     ` Matthew McClintock
2006-10-12  9:16       ` Markus Klotzbücher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox