]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Silence new gcc warnings on switch statement fallthroughs
authorJouni Malinen <jouni@codeaurora.org>
Tue, 15 May 2018 17:27:17 +0000 (20:27 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 15 May 2018 17:55:17 +0000 (20:55 +0300)
Reword the comments to make gcc 8.1 recognize these as designed cases
and not trigger implicit-fallthrough warnings.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/eap_server/eap_server_fast.c
src/eap_server/eap_server_ikev2.c
src/eap_server/eap_server_wsc.c
src/fst/fst_ctrl_iface.c
src/radius/radius_client.c
wpa_supplicant/mesh_mpm.c

index fa0342f040a840a1969512a35fa35337866ae084..a63f820465c8b99b8b154292f7e132d2d7724fff 100644 (file)
@@ -1516,7 +1516,7 @@ static void eap_fast_process_msg(struct eap_sm *sm, void *priv,
                if (eap_fast_process_phase1(sm, data))
                        break;
 
-               /* fall through to PHASE2_START */
+               /* fall through */
        case PHASE2_START:
                eap_fast_process_phase2_start(sm, data);
                break;
index 183341950292b09f8696466949d60c776bdb8220..32e6872045c54d476fe50df11948a3f97bc58298 100644 (file)
@@ -223,7 +223,7 @@ static struct wpabuf * eap_ikev2_buildReq(struct eap_sm *sm, void *priv, u8 id)
                        }
                        data->out_used = 0;
                }
-               /* pass through */
+               /* fall through */
        case WAIT_FRAG_ACK:
                return eap_ikev2_build_msg(data, id);
        case FRAG_ACK:
index 7d9d285c39d01bf55a484e5afea6382bdeb93a26..4a5cb980afac701fee6361367d8445f1694116e9 100644 (file)
@@ -257,7 +257,7 @@ static struct wpabuf * eap_wsc_buildReq(struct eap_sm *sm, void *priv, u8 id)
                        }
                        data->out_used = 0;
                }
-               /* pass through */
+               /* fall through */
        case WAIT_FRAG_ACK:
                return eap_wsc_build_msg(data, id);
        case FRAG_ACK:
index 7820e586629f2b868d9b78d140b0ca4eda720b03..7df3362b6e938b2ca3279b7ff74e002400d3fa12 100644 (file)
@@ -49,7 +49,7 @@ static Boolean format_session_state_extra(const union fst_event_extra *extra,
                if (ss->extra.to_initial.reject_code != WLAN_STATUS_SUCCESS)
                        os_snprintf(reject_str, sizeof(reject_str), "%u",
                                    ss->extra.to_initial.reject_code);
-               /* no break */
+               /* fall through */
        case REASON_TEARDOWN:
        case REASON_SWITCH:
                switch (ss->extra.to_initial.initiator) {
index 06c804d132fd59286114b026c703de2fe9663de3..a87ee745eb28446734069f070d493d98396b1f14 100644 (file)
@@ -904,13 +904,13 @@ static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx)
                switch (res) {
                case RADIUS_RX_PROCESSED:
                        radius_msg_free(msg);
-                       /* continue */
+                       /* fall through */
                case RADIUS_RX_QUEUED:
                        radius_client_msg_free(req);
                        return;
                case RADIUS_RX_INVALID_AUTHENTICATOR:
                        invalid_authenticator++;
-                       /* continue */
+                       /* fall through */
                case RADIUS_RX_UNKNOWN:
                        /* continue with next handler */
                        break;
index bc3cc5ef95e2c44ab11c050b5ec6528a6543f07a..d166cfeec990b70661cf4e87b2848af5f929ac59 100644 (file)
@@ -437,7 +437,7 @@ static void plink_timer(void *eloop_ctx, void *user_data)
                        break;
                }
                reason = WLAN_REASON_MESH_MAX_RETRIES;
-               /* fall through on else */
+               /* fall through */
 
        case PLINK_CNF_RCVD:
                /* confirm timer */