staging: rtl8188eu: Fix fall-through warnings for Clang
authorGustavo A. R. Silva <gustavoars@kernel.org>
Fri, 28 May 2021 20:06:50 +0000 (15:06 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Jun 2021 13:58:45 +0000 (15:58 +0200)
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/115
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20210528200650.GA39289@embeddedor
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_wlan_util.c

index b4d81d3..6803e93 100644 (file)
@@ -3378,6 +3378,7 @@ static unsigned int OnAssocRsp(struct adapter *padapter,
                        break;
                case WLAN_EID_ERP_INFO:
                        ERP_IE_handler(padapter, pIE);
+                       break;
                default:
                        break;
                }
index 3e244e9..c9043f4 100644 (file)
@@ -1029,6 +1029,7 @@ unsigned int is_ap_in_tkip(struct adapter *padapter)
                        case WLAN_EID_RSN:
                                if (!memcmp((pIE->data + 8), RSN_TKIP_CIPHER, 4))
                                        return true;
+                               break;
                        default:
                                break;
                        }
@@ -1226,6 +1227,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
                        } else {
                                break;
                        }
+                       break;
 
                default:
                        break;