Skip to contentSkip to conversation

net: x25: mark expected switch fall-throughs

PATCH Applied Gustavo A. R. Silva 2 participants 2 messages Oct 20, 2017 – Oct 22, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: x25: mark expected switch fall-throughs

In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through.

---
This code was tested by compilation only (GCC 7.2.0 was used). Please, verify if the actual intention of the code is to fall through.

 net/x25/x25_facilities.c | 2 +-
 net/x25/x25_in.c         | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
net/x25/x25_facilities.c +1 -1
index 997ff7b..ad1734d 100644
@@ -103,7 +103,7 @@ int x25_parse_facilities(struct sk_buff *skb, struct x25_facilities *facilities,
 					*vc_fac_mask |= X25_MASK_REVERSE;
 					break;
 				}
-
+				/*fall through */
 			case X25_FAC_THROUGHPUT:
 				facilities->throughput = p[1];
 				*vc_fac_mask |= X25_MASK_THROUGHPUT;
net/x25/x25_in.c +1 -0
index 7ac5009..3c12cae 100644
@@ -345,6 +345,7 @@ static int x25_state4_machine(struct sock *sk, struct sk_buff *skb, int frametyp
 
 		case X25_RESET_REQUEST:
 			x25_write_internal(sk, X25_RESET_CONFIRMATION);
+			/* fall through */
 		case X25_RESET_CONFIRMATION: {
 			x25_stop_timer(sk);
 			x25->condition = 0x00;
Signature · 1 line
2.7.4