git: 7df49deb2e7f - stable/13 - Fix unused variable warning in ieee80211_proto.c

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 29 Jul 2022 18:47:28 UTC
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=7df49deb2e7fbdabadd332db66e4edc59716a724

commit 7df49deb2e7fbdabadd332db66e4edc59716a724
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-26 19:05:36 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-29 18:29:09 +0000

    Fix unused variable warning in ieee80211_proto.c
    
    With clang 15, the following -Werror warning is produced:
    
        sys/net80211/ieee80211_proto.c:1070:34: error: variable 'num_mixed' set but not used [-Werror,-Wunused-but-set-variable]
                int num_vaps = 0, num_pure = 0, num_mixed = 0;
                                                ^
    
    The 'num_mixed' variable was in ieee80211_proto.c when the function
    vap_update_ht_protmode() was added, but it was never used for anything,
    so remove it.
    
    MFC after:      3 days
    
    (cherry picked from commit 9319211f96c6f11959c76f1d565a744ab37b0031)
---
 sys/net80211/ieee80211_proto.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c
index f42c62444579..9c7343d8b904 100644
--- a/sys/net80211/ieee80211_proto.c
+++ b/sys/net80211/ieee80211_proto.c
@@ -1067,7 +1067,7 @@ vap_update_ht_protmode(void *arg, int npending)
 	struct ieee80211vap *vap = arg;
 	struct ieee80211vap *iv;
 	struct ieee80211com *ic = vap->iv_ic;
-	int num_vaps = 0, num_pure = 0, num_mixed = 0;
+	int num_vaps = 0, num_pure = 0;
 	int num_optional = 0, num_ht2040 = 0, num_nonht = 0;
 	int num_ht_sta = 0, num_ht40_sta = 0, num_sta = 0;
 	int num_nonhtpr = 0;
@@ -1108,9 +1108,6 @@ vap_update_ht_protmode(void *arg, int npending)
 		case IEEE80211_HTINFO_OPMODE_HT20PR:
 			num_ht2040++;
 			break;
-		case IEEE80211_HTINFO_OPMODE_MIXED:
-			num_mixed++;
-			break;
 		}
 
 		IEEE80211_DPRINTF(vap, IEEE80211_MSG_11N,