]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: assabet: fix bogus warning in get_assabet_scr (again)
authorArnd Bergmann <arnd@arndb.de>
Mon, 30 Apr 2012 12:41:21 +0000 (12:41 +0000)
committerArnd Bergmann <arnd@arndb.de>
Tue, 9 Oct 2012 15:27:01 +0000 (17:27 +0200)
commitbd43ed2b28f8ba88331303f254a9625c8f215ec1
treefdb9f96e20c9e009a401c7d4226a3ec7c1e6d5f1
parent80e476488db03a4062c3d912b9c1dd7b5b547b4d
ARM: assabet: fix bogus warning in get_assabet_scr (again)

Russell fixed this bogus warning before in 7e7d1aca49 "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 <arnd@arndb.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-sa1100/assabet.c