Re: [PATCH 27/28] rocker: fix maybe-uninitialized warning
From: David Miller
Date: Tue Oct 18 2016 - 14:21:39 EST
From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Tue, 18 Oct 2016 00:16:15 +0200
> In some rare configurations, we get a warning about the 'index' variable
> being used without an initialization:
>
> drivers/net/ethernet/rocker/rocker_ofdpa.c: In function ʽofdpa_port_fib_ipv4.isra.16.constpropʼ:
> drivers/net/ethernet/rocker/rocker_ofdpa.c:2425:92: warning: ʽindexʼ may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> This is a false positive, the logic is just a bit too complex for gcc
> to follow here. Moving the intialization of 'index' a little further
> down makes it clear to gcc that the function always returns an error
> if it is not initialized.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Applied.