]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: Fix switch statement warnings with recent gcc.
authorDavid Miller <davem@davemloft.net>
Wed, 8 Apr 2015 03:05:42 +0000 (23:05 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Apr 2015 19:20:50 +0000 (15:20 -0400)
commit3afbcb43c65e0212224e8264bec52a2648f549df
treeb4d26d6d3f93a8a5129d0e2718f3a4a28f71c25c
parent381c13db74e851d20624f87d2ffa56960622b040
netfilter: Fix switch statement warnings with recent gcc.

More recent GCC warns about two kinds of switch statement uses:

1) Switching on an enumeration, but not having an explicit case
   statement for all members of the enumeration.  To show the
   compiler this is intentional, we simply add a default case
   with nothing more than a break statement.

2) Switching on a boolean value.  I think this warning is dumb
   but nevertheless you get it wholesale with -Wswitch.

This patch cures all such warnings in netfilter.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/nft_reject_bridge.c
net/ipv4/netfilter/nft_reject_ipv4.c
net/ipv6/netfilter/nft_reject_ipv6.c
net/netfilter/nft_compat.c
net/netfilter/nft_ct.c