]> git.baikalelectronics.ru Git - kernel.git/commit
net: vrf: avoid gcc-4.6 warning
authorArnd Bergmann <arnd@arndb.de>
Tue, 12 Sep 2017 20:10:53 +0000 (22:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Sep 2017 21:22:21 +0000 (14:22 -0700)
commit7aa6f405924ab6d0b56e74abe0201180ee7486dd
tree433743e1e115d3720f5aa263af9a4253788bbc9e
parent06ef443ec4e0a3dc54f83b9b2c54d74f66b6f5d1
net: vrf: avoid gcc-4.6 warning

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: 6523e248fcd6 ("net: vrf: Handle ipv6 multicast and link-local addresses")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c