From 2e9090dfbefeae201fb7a753bff208b95e44ebe7 Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Sat, 14 May 2016 08:54:34 +0000 Subject: [PATCH] Revert parts of r299575 in order to make more MIPS kernels build again hopefully. Rather than blindly removing a supposedly unused variable as reported by the Clang Static Analyzer, inspect the code and hide them with proper #ifdefs as they are used in certain conditional parts of the code. --- sys/net80211/ieee80211_output.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 65fe12693d31..dfde06a62768 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -121,6 +121,9 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, { struct ieee80211com *ic = vap->iv_ic; struct ifnet *ifp = vap->iv_ifp; +#ifdef IEEE80211_SUPPORT_SUPERG + int mcast; +#endif if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && (m->m_flags & M_PWR_SAV) == 0) { @@ -160,6 +163,9 @@ ieee80211_vap_pkt_send_dest(struct ieee80211vap *vap, struct mbuf *m, * interface it (might have been) received on. */ m->m_pkthdr.rcvif = (void *)ni; +#ifdef IEEE80211_SUPPORT_SUPERG + mcast = (m->m_flags & (M_MCAST | M_BCAST)) ? 1: 0; +#endif BPF_MTAP(ifp, m); /* 802.3 tx */