提交 79121184 编写于 作者: G Gustavo A. R. Silva

ipv4: Fix fall-through warnings for Clang

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: https://github.com/KSPP/linux/issues/115Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org>
上级 d66aea44
...@@ -450,6 +450,7 @@ static int ah4_err(struct sk_buff *skb, u32 info) ...@@ -450,6 +450,7 @@ static int ah4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH: case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0; return 0;
break;
case ICMP_REDIRECT: case ICMP_REDIRECT:
break; break;
default: default:
......
...@@ -982,6 +982,7 @@ static int esp4_err(struct sk_buff *skb, u32 info) ...@@ -982,6 +982,7 @@ static int esp4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH: case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0; return 0;
break;
case ICMP_REDIRECT: case ICMP_REDIRECT:
break; break;
default: default:
......
...@@ -1874,6 +1874,7 @@ static int call_fib_nh_notifiers(struct fib_nh *nh, ...@@ -1874,6 +1874,7 @@ static int call_fib_nh_notifiers(struct fib_nh *nh,
(nh->fib_nh_flags & RTNH_F_DEAD)) (nh->fib_nh_flags & RTNH_F_DEAD))
return call_fib4_notifiers(dev_net(nh->fib_nh_dev), return call_fib4_notifiers(dev_net(nh->fib_nh_dev),
event_type, &info.info); event_type, &info.info);
break;
default: default:
break; break;
} }
......
...@@ -351,6 +351,7 @@ static int vti4_err(struct sk_buff *skb, u32 info) ...@@ -351,6 +351,7 @@ static int vti4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH: case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0; return 0;
break;
case ICMP_REDIRECT: case ICMP_REDIRECT:
break; break;
default: default:
......
...@@ -31,6 +31,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info) ...@@ -31,6 +31,7 @@ static int ipcomp4_err(struct sk_buff *skb, u32 info)
case ICMP_DEST_UNREACH: case ICMP_DEST_UNREACH:
if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED) if (icmp_hdr(skb)->code != ICMP_FRAG_NEEDED)
return 0; return 0;
break;
case ICMP_REDIRECT: case ICMP_REDIRECT:
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册