net: dccp: mark expected switch fall-throughs
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Sun, 15 Oct 2017 18:22:10 +0000 (13:22 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2017 20:15:21 +0000 (21:15 +0100)
In preparation to enabling -Wimplicit-fallthrough, mark switch cases
where we are expecting to fall through.

Notice that for options.c file, I placed the "fall through" comment
on its own line, which is what GCC is expecting to find.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dccp/input.c
net/dccp/options.c

index fa6be9750bb46d9aeee2462fa86ed1a7cfc40cd1..d28d46bff6ab43441f34284ec975c1e052a774d0 100644 (file)
@@ -534,6 +534,7 @@ static int dccp_rcv_respond_partopen_state_process(struct sock *sk,
        case DCCP_PKT_DATA:
                if (sk->sk_state == DCCP_RESPOND)
                        break;
+               /* fall through */
        case DCCP_PKT_DATAACK:
        case DCCP_PKT_ACK:
                /*
index 51cdfc3bd8cada21b28e913740dfb026c151ba1f..4e40db017e198b15f74df56f02a66aa4cbe3f28e 100644 (file)
@@ -227,8 +227,8 @@ int dccp_parse_options(struct sock *sk, struct dccp_request_sock *dreq,
                         * Ack vectors are processed by the TX CCID if it is
                         * interested. The RX CCID need not parse Ack Vectors,
                         * since it is only interested in clearing old state.
-                        * Fall through.
                         */
+                       /* fall through */
                case DCCPO_MIN_TX_CCID_SPECIFIC ... DCCPO_MAX_TX_CCID_SPECIFIC:
                        if (ccid_hc_tx_parse_options(dp->dccps_hc_tx_ccid, sk,
                                                     pkt_type, opt, value, len))