[U-Boot] [PATCH 04/13] common/cmd_pxe.c: Fix compile warning

Wolfgang Denk wd at denx.de
Fri Dec 9 12:14:23 CET 2011


Fix:
cmd_pxe.c: In function 'parse_pxefile_top':
cmd_pxe.c:941:5: warning: 'err' may be used uninitialized in this
function [-Wuninitialized]
cmd_pxe.c:921:6: note: 'err' was declared here

Signed-off-by: Wolfgang Denk <wd at denx.de>
Cc: Jason Hobbs <jason.hobbs at calxeda.com>
---
 common/cmd_pxe.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/common/cmd_pxe.c b/common/cmd_pxe.c
index 9426f5b..eaf95bf 100644
--- a/common/cmd_pxe.c
+++ b/common/cmd_pxe.c
@@ -936,6 +936,7 @@ static int parse_menu(char **c, struct pxe_menu *cfg, char *b, int nest_level)
 	default:
 		printf("Ignoring malformed menu command: %.*s\n",
 				(int)(*c - s), s);
+		err = -1;
 	}
 
 	if (err < 0)
-- 
1.7.6.4



More information about the U-Boot mailing list