[U-Boot] kconfig: Fix warning "‘jump’ may be used uninitialized"

Tom Rini trini at ti.com
Mon Dec 8 22:43:46 CET 2014


On Sat, Nov 29, 2014 at 05:26:04PM +0900, Masahiro Yamada wrote:

> From: Peter Kümmel <syntheticpp at gmx.net>
> 
> Warning:
> In file included from scripts/kconfig/zconf.tab.c:2537:0:
> scripts/kconfig/menu.c: In function ‘get_symbol_str’:
> scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>      jump->offset = strlen(r->s);
> 
> Simplifies the test logic because (head && local) means (jump != 0)
> and makes GCC happy when checking if the jump pointer was initialized.
> 
> Signed-off-by: Peter Kümmel <syntheticpp at gmx.net>
> Signed-off-by: Michal Marek <mmarek at suse.cz>
> [ imported from Linux Kernel, commit 2d5603060967 ]
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141208/392852f1/attachment.pgp>


More information about the U-Boot mailing list