diff options
author | Roland Dreier <roland@purestorage.com> | 2012-06-10 16:05:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-11 03:04:47 -0400 |
commit | c5d21c4b2a7765ab0600c8426374b50eb9f4a36f (patch) | |
tree | 378b2516d9cb56352dde1f0d9d2884350b24f0f5 /include | |
parent | 83a27052c3376793bc879e00e6e6805d6fb7aab9 (diff) |
net: Reorder initialization in ip_route_output to fix gcc warning
If I build with W=1, for every file that includes <net/route.h>, I get the warning
include/net/route.h: In function 'ip_route_output':
include/net/route.h:135:3: warning: initialized field overwritten [-Woverride-init]
include/net/route.h:135:3: warning: (near initialization for 'fl4') [-Woverride-init]
(This is with "gcc (Debian 4.6.3-1) 4.6.3")
A fix seems pretty trivial: move the initialization of .flowi4_tos
earlier. As far as I can tell, this has no effect on code generation.
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/route.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/route.h b/include/net/route.h index ed2b78e2375d..98705468ac03 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -130,9 +130,9 @@ static inline struct rtable *ip_route_output(struct net *net, __be32 daddr, | |||
130 | { | 130 | { |
131 | struct flowi4 fl4 = { | 131 | struct flowi4 fl4 = { |
132 | .flowi4_oif = oif, | 132 | .flowi4_oif = oif, |
133 | .flowi4_tos = tos, | ||
133 | .daddr = daddr, | 134 | .daddr = daddr, |
134 | .saddr = saddr, | 135 | .saddr = saddr, |
135 | .flowi4_tos = tos, | ||
136 | }; | 136 | }; |
137 | return ip_route_output_key(net, &fl4); | 137 | return ip_route_output_key(net, &fl4); |
138 | } | 138 | } |