Date: Fri, 29 Jul 2022 18:48:35 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 22bc126280d9 - stable/12 - Fix unused variable warning in ieee80211_proto.c Message-ID: <202207291848.26TImZwc025573@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=22bc126280d97af0f0353b7d4e550293d3d0c1d6 commit 22bc126280d97af0f0353b7d4e550293d3d0c1d6 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:37:15 +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 2f98deea88d9..65d1b2900ac1 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -1054,7 +1054,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; @@ -1095,9 +1095,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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291848.26TImZwc025573>