diff options
author | David Miller <davem@davemloft.net> | 2015-04-07 23:05:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-08 15:20:50 -0400 |
commit | c1f866767777d1c6abae0ec57effffcb72017c00 (patch) | |
tree | b4d26d6d3f93a8a5129d0e2718f3a4a28f71c25c /net/ipv4 | |
parent | e85e85c85a6ae250ef2549065fc0c7377ba4689b (diff) | |
download | linux-c1f866767777d1c6abae0ec57effffcb72017c00.tar.gz linux-c1f866767777d1c6abae0ec57effffcb72017c00.tar.bz2 linux-c1f866767777d1c6abae0ec57effffcb72017c00.zip |
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>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/nft_reject_ipv4.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/nft_reject_ipv4.c b/net/ipv4/netfilter/nft_reject_ipv4.c index 16a5d4d73d75..a7621faa9678 100644 --- a/net/ipv4/netfilter/nft_reject_ipv4.c +++ b/net/ipv4/netfilter/nft_reject_ipv4.c @@ -33,6 +33,8 @@ static void nft_reject_ipv4_eval(const struct nft_expr *expr, case NFT_REJECT_TCP_RST: nf_send_reset(pkt->skb, pkt->ops->hooknum); break; + default: + break; } data[NFT_REG_VERDICT].verdict = NF_DROP; |