net: Reorder initialization in ip_route_output to fix gcc warning
authorRoland Dreier <roland@purestorage.com>
Sun, 10 Jun 2012 20:05:24 +0000 (20:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jun 2012 07:04:47 +0000 (00:04 -0700)
commitc5d21c4b2a7765ab0600c8426374b50eb9f4a36f
tree378b2516d9cb56352dde1f0d9d2884350b24f0f5
parent83a27052c3376793bc879e00e6e6805d6fb7aab9
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>
include/net/route.h