Re: [PATCH] net: vrf: avoid gcc-4.6 warning

From: David Miller
Date: Fri Sep 15 2017 - 17:22:50 EST


From: Arnd Bergmann <arnd@xxxxxxxx>
Date: Tue, 12 Sep 2017 22:10:53 +0200

> When building an allmodconfig kernel with gcc-4.6, we get a rather
> odd warning:
>
> drivers/net/vrf.c: In function ʽvrf_ip6_input_dstʼ:
> drivers/net/vrf.c:964:3: error: initialized field with side-effects overwritten [-Werror]
> drivers/net/vrf.c:964:3: error: (near initialization for ʽfl6ʼ) [-Werror]
>
> I have no idea what this warning is even trying to say, but it does
> seem like a false positive. Reordering the initialization in to match
> the structure definition gets rid of the warning, and might also avoid
> whatever gcc thinks is wrong here.
>
> Fixes: 9ff74384600a ("net: vrf: Handle ipv6 multicast and link-local addresses")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

That's extremely weird, I can't explain it either.

Oh well, applied, thanks.