[Madwifi-cvs] revision 4139 committed
Status: Beta
Brought to you by:
otaku
From: Pavel R. <svn...@ma...> - 2011-05-03 22:07:47
|
Project : madwifi Revision : 4139 Author : proski (Pavel Roskin) Date : 2011-05-04 00:07:34 +0200 (Wed, 04 May 2011) Log Message : Fix all instances of unused variables reported by gcc 4.6.0. Change IEEE80211_NODE_SAVEQ_DEQUEUE to a compound statement returning a value, which may or may not be ignored by the caller. Affected Files: * madwifi/branches/madwifi-0.9.4/ath/if_ath.c updated * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_beacon.c updated * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c updated * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h updated * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c updated * madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c updated Modified: madwifi/branches/madwifi-0.9.4/ath/if_ath.c =================================================================== --- madwifi/branches/madwifi-0.9.4/ath/if_ath.c 2011-05-03 22:00:38 UTC (rev 4138) +++ madwifi/branches/madwifi-0.9.4/ath/if_ath.c 2011-05-03 22:07:34 UTC (rev 4139) @@ -2494,7 +2494,6 @@ { struct ath_buf *bf_ff = NULL; struct ieee80211_node *ni = NULL; - int pktlen; int framecnt; for (;;) { @@ -2523,7 +2522,6 @@ sc->sc_stats.ast_tx_encap++; goto bad; } - pktlen = bf_ff->bf_skb->len; /* NB: don't reference skb below */ if (ath_tx_start(sc->sc_dev, ni, bf_ff, bf_ff->bf_skb, 0) == 0) continue; bad: @@ -2585,7 +2583,6 @@ int framecnt; int requeue = 0; #ifdef ATH_SUPERG_FF - int pktlen; struct ieee80211com *ic = &sc->sc_ic; struct ath_node *an; struct ath_txq *txq = NULL; @@ -2720,7 +2717,6 @@ sc->sc_stats.ast_tx_encap++; goto ff_flushbad; } - pktlen = bf_ff->bf_skb->len; /* NB: don't reference skb below */ /* NB: ath_tx_start() will use ATH_TXBUF_LOCK_BH(). The _BH * portion is not needed here since we're running at * interrupt time, but should be harmless. @@ -3758,7 +3754,6 @@ struct ieee80211vap *vap=NULL; struct ath_vap *avp; struct ath_buf *bf; - struct sk_buff *skb; struct ath_desc *ds; struct ath_hal *ah = sc->sc_ah; int slot; @@ -3776,7 +3771,6 @@ return 0; avp = ATH_VAP(vap); bf = avp->av_bcbuf; - skb = bf->bf_skb; ds = bf->bf_desc; return (ath_hal_txprocdesc(ah, ds) != HAL_EINPROGRESS); Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_beacon.c =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_beacon.c 2011-05-03 22:00:38 UTC (rev 4138) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_beacon.c 2011-05-03 22:07:34 UTC (rev 4139) @@ -201,7 +201,6 @@ struct sk_buff *skb; int pktlen; u_int8_t *frm; - struct ieee80211_rateset *rs; /* * beacon frame format @@ -224,7 +223,6 @@ * XXX Vendor-specific OIDs (e.g. Atheros) * NB: we allocate the max space required for the TIM bitmap. */ - rs = &ni->ni_rates; pktlen = 8 /* time stamp */ + sizeof(u_int16_t) /* beacon interval */ + sizeof(u_int16_t) /* capability information */ Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c 2011-05-03 22:00:38 UTC (rev 4138) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_input.c 2011-05-03 22:07:34 UTC (rev 4139) @@ -3678,7 +3678,7 @@ /* Okay, take the first queued packet and put it out... */ IEEE80211_NODE_SAVEQ_LOCK(ni); - IEEE80211_NODE_SAVEQ_DEQUEUE(ni, skb, qlen); + qlen = IEEE80211_NODE_SAVEQ_DEQUEUE(ni, skb); IEEE80211_NODE_SAVEQ_UNLOCK(ni); if (skb == NULL) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_POWER, wh->i_addr2, Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h 2011-05-03 22:00:38 UTC (rev 4138) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_linux.h 2011-05-03 22:07:34 UTC (rev 4139) @@ -259,10 +259,10 @@ } while (0) /* caller MUST lock IEEE80211_NODE_SAVEQ */ -#define IEEE80211_NODE_SAVEQ_DEQUEUE(_ni, _skb, _qlen) do { \ +#define IEEE80211_NODE_SAVEQ_DEQUEUE(_ni, _skb) ({ \ _skb = __skb_dequeue(&(_ni)->ni_savedq); \ - (_qlen) = skb_queue_len(&(_ni)->ni_savedq); \ -} while (0) + skb_queue_len(&(_ni)->ni_savedq); \ +}) #define _IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _skb, _qlen, _age) do { \ struct sk_buff *tail = skb_peek_tail(&(_ni)->ni_savedq); \ if (tail != NULL) { \ Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c 2011-05-03 22:00:38 UTC (rev 4138) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_power.c 2011-05-03 22:07:34 UTC (rev 4139) @@ -293,10 +293,9 @@ IEEE80211_NODE_SAVEQ_QLEN(ni)); for (;;) { struct sk_buff *skb; - int qlen; IEEE80211_NODE_SAVEQ_LOCK(ni); - IEEE80211_NODE_SAVEQ_DEQUEUE(ni, skb, qlen); + IEEE80211_NODE_SAVEQ_DEQUEUE(ni, skb); IEEE80211_NODE_SAVEQ_UNLOCK(ni); if (skb == NULL) break; Modified: madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c =================================================================== --- madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c 2011-05-03 22:00:38 UTC (rev 4138) +++ madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c 2011-05-03 22:07:34 UTC (rev 4139) @@ -5322,7 +5322,6 @@ ieee80211_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { struct ieee80211vap *vap = netdev_priv(dev); - u_int unit; switch (cmd) { case SIOCG80211STATS: @@ -5332,7 +5331,6 @@ if (!capable(CAP_NET_ADMIN)) return -EPERM; ieee80211_stop(vap->iv_dev); /* force state before cleanup */ - unit = vap->iv_unit; vap->iv_ic->ic_vap_delete(vap); return 0; case IEEE80211_IOCTL_GETKEY: |