[U-Boot] [PATCH v2 2/7] microblaze: board: Remove compilation warning

Michal Simek monstr at monstr.eu
Mon Aug 6 09:46:34 CEST 2012


Variable is used when CONFIG_SYS_FLASH_CHECKSUM is used.

Warning log:
board.c: In function 'board_init':
board.c:101: warning: unused variable 's'

Signed-off-by: Michal Simek <monstr at monstr.eu>

---
v2: Use __mabe_unused prefix
---
 arch/microblaze/lib/board.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index 942e18c..b5f21d8 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -32,6 +32,7 @@
 #include <stdio_dev.h>
 #include <serial.h>
 #include <net.h>
+#include <linux/compiler.h>
 #include <asm/processor.h>
 #include <asm/microblaze_intc.h>
 #include <fdtdec.h>
@@ -91,7 +92,7 @@ void board_init (void)
 	gd = (gd_t *) (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET);
 	bd = (bd_t *) (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET \
 						- GENERATED_BD_INFO_SIZE);
-	char *s;
+	__maybe_unused char *s;
 #if defined(CONFIG_CMD_FLASH)
 	ulong flash_size = 0;
 #endif
-- 
1.7.0.4



More information about the U-Boot mailing list