Skip to content

Commit ecf0911

Browse files
arndbdavem330
authored andcommitted
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: 9ff7438 ("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>
1 parent 4739df6 commit ecf0911

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/vrf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,12 +957,12 @@ static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev,
957957
{
958958
const struct ipv6hdr *iph = ipv6_hdr(skb);
959959
struct flowi6 fl6 = {
960+
.flowi6_iif = ifindex,
961+
.flowi6_mark = skb->mark,
962+
.flowi6_proto = iph->nexthdr,
960963
.daddr = iph->daddr,
961964
.saddr = iph->saddr,
962965
.flowlabel = ip6_flowinfo(iph),
963-
.flowi6_mark = skb->mark,
964-
.flowi6_proto = iph->nexthdr,
965-
.flowi6_iif = ifindex,
966966
};
967967
struct net *net = dev_net(vrf_dev);
968968
struct rt6_info *rt6;

0 commit comments

Comments
 (0)