[U-Boot-Users] [PATCH] Fix possible uninitialized variable compiler warning.
Grant Likely
grant.likely at secretlab.ca
Tue Oct 10 08:23:32 CEST 2006
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 at 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
More information about the U-Boot
mailing list