From 4b6c218e95563b220b0b7310f6e92845a0a359f3 Mon Sep 17 00:00:00 2001 From: kimocoder Date: Sun, 12 Jul 2020 03:44:51 +0000 Subject: [PATCH] Fix multiple warnings when using clang --- core/rtw_mlme_ext.c | 6 ------ hal/hal_intf.c | 1 - os_dep/linux/ioctl_cfg80211.c | 2 -- 3 files changed, 9 deletions(-) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 79cbe2d..01136fb 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -258,7 +258,6 @@ void rtw_txpwr_init_regd(struct rf_ctl_t *rfctl) ); if (rfctl->regd_name) break; - __attribute__ ((__fallthrough__)); default: rfctl->regd_name = regd_str(TXPWR_LMT_WW); RTW_PRINT("assign %s for default case\n", regd_str(TXPWR_LMT_WW)); @@ -1343,11 +1342,6 @@ void mgt_dispatcher(_adapter *padapter, union recv_frame *precv_frame) ptable->func = &OnAuth; else ptable->func = &OnAuthClient; -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0) - __attribute__ ((fallthrough)); -#else - __attribute__ ((__fallthrough__)); -#endif case WIFI_ASSOCREQ: case WIFI_REASSOCREQ: _mgt_dispatcher(padapter, ptable, precv_frame); diff --git a/hal/hal_intf.c b/hal/hal_intf.c index daa42f9..66a2954 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -1082,7 +1082,6 @@ s32 c2h_handler(_adapter *adapter, u8 id, u8 seq, u8 plen, u8 *payload) case C2H_EXTEND: sub_id = payload[0]; /* no handle, goto default */ - __attribute__ ((__fallthrough__)); default: if (phydm_c2H_content_parsing(adapter_to_phydm(adapter), id, plen, payload) != TRUE) ret = _FAIL; diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 62bcbd5..ab8b1a7 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -2471,7 +2471,6 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, case NL80211_IFTYPE_P2P_CLIENT: is_p2p = _TRUE; #endif - __attribute__ ((__fallthrough__)); case NL80211_IFTYPE_STATION: networkType = Ndis802_11Infrastructure; @@ -2496,7 +2495,6 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy, case NL80211_IFTYPE_P2P_GO: is_p2p = _TRUE; #endif - __attribute__ ((__fallthrough__)); case NL80211_IFTYPE_AP: networkType = Ndis802_11APMode;