[U-Boot] [PATCH] arch/powerpc/lib/board.c: fix build warning

Wolfgang Denk wd at denx.de
Sun Oct 23 23:58:52 CEST 2011


Commit 1272592 "powerpc: Use getenv_ulong() in place of getenv(),
strtoul" instroduced a build warning for some PPC systems:

board.c: In function 'board_init_r':
board.c:626: warning: unused variable 's'

Fix it.

Signed-off-by: Wolfgang Denk <wd at denx.de>
---
 arch/powerpc/lib/board.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/lib/board.c b/arch/powerpc/lib/board.c
index 6cb0ed6..aff1a0c 100644
--- a/arch/powerpc/lib/board.c
+++ b/arch/powerpc/lib/board.c
@@ -623,10 +623,11 @@ void board_init_f (ulong bootflag)
  */
 void board_init_r (gd_t *id, ulong dest_addr)
 {
-	char *s;
 	bd_t *bd;
 	ulong malloc_start;
-
+#if defined(CONFIG_SYS_FLASH_CHECKSUM) || defined(CONFIG_CMD_NET)
+	char *s;
+#endif
 #ifndef CONFIG_SYS_NO_FLASH
 	ulong flash_size;
 #endif
-- 
1.7.6.2



More information about the U-Boot mailing list