From: Grant Likely Date: Tue, 10 Oct 2006 06:23:32 +0000 (-0600) Subject: Fix possible uninitialized variable compiler warning. X-Git-Tag: U-Boot-1_1_6~20^2~1^2~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1eaf3a5ff4960a46f3a9063568ba2af7883f07c5;p=oweals%2Fu-boot.git Fix possible uninitialized variable compiler warning. 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 --- diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index e2cb6b93cd..c533c00d66 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -625,7 +625,7 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag, /* 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