From c6e9fbbf4c9aa837c0d39a097f96aaf4f90dfef1 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 30 Apr 2012 12:41:21 +0000 Subject: ARM: assabet: fix bogus warning in get_assabet_scr (again) Russell fixed this bogus warning before in 2f3eca8b4f "Shut up gcc warning in assabet.c", but apparently gcc has become smarter (or dumber) since 2005, and the same warning came up again. This uses the uninitialized_var() macro to convince gcc that the variable is actually being initialized. 100 times in fact. Without this patch, building assabet_defconfig results in: arch/arm/mach-sa1100/assabet.c: In function 'fixup_assabet': arch/arm/mach-sa1100/assabet.c:397:6: warning: 'scr' may be used uninitialized in this function [-Wuninitialized] arch/arm/mach-sa1100/assabet.c:389:16: note: 'scr' was declared here Signed-off-by: Arnd Bergmann Cc: Russell King --- arch/arm/mach-sa1100/assabet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-sa1100/assabet.c') diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c index e1ccda6..6a7ad3c 100644 --- a/arch/arm/mach-sa1100/assabet.c +++ b/arch/arm/mach-sa1100/assabet.c @@ -388,7 +388,7 @@ static void __init map_sa1100_gpio_regs( void ) */ static void __init get_assabet_scr(void) { - unsigned long scr, i; + unsigned long uninitialized_var(scr), i; GPDR |= 0x3fc; /* Configure GPIO 9:2 as outputs */ GPSR = 0x3fc; /* Write 0xFF to GPIO 9:2 */ -- cgit v1.1