Skip to content

Commit

Permalink
ipv4: Fix fall-through warnings for Clang
Browse files Browse the repository at this point in the history
In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple
warnings by explicitly adding multiple break statements instead of just
letting the code fall through to the next case.

Link: KSPP/linux#115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
  • Loading branch information
GustavoARSilva committed May 18, 2021
1 parent d66aea4 commit 7912118
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions net/ipv4/ah4.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ static int ah4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0;
break;
case ICMP_REDIRECT:
break;
default:
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/esp4.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,7 @@ static int esp4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0;
break;
case ICMP_REDIRECT:
break;
default:
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/fib_semantics.c
Original file line number Diff line number Diff line change
Expand Up @@ -1874,6 +1874,7 @@ static int call_fib_nh_notifiers(struct fib_nh *nh,
(nh->fib_nh_flags & RTNH_F_DEAD))
return call_fib4_notifiers(dev_net(nh->fib_nh_dev),
event_type, &info.info);
break;
default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/ip_vti.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ static int vti4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0;
break;
case ICMP_REDIRECT:
break;
default:
Expand Down
1 change: 1 addition & 0 deletions net/ipv4/ipcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0;
break;
case ICMP_REDIRECT:
break;
default:
Expand Down

0 comments on commit 7912118

Please sign in to comment.