linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] wireless: Fix warnings due to -Wunused-but-set-variable
@ 2011-04-25 10:26 Rajkumar Manoharan
  2011-04-25 10:26 ` [PATCH 2/5] mac80211: " Rajkumar Manoharan
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Rajkumar Manoharan @ 2011-04-25 10:26 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Rajkumar Manoharan

These warnings are exposed by gcc 4.6.
net/wireless/reg.c: In function 'freq_reg_info_regd':
net/wireless/reg.c:675:38: warning: variable 'pr' set but not used
[-Wunused-but-set-variable]
net/wireless/lib80211_crypt_wep.c: In function 'lib80211_wep_build_iv':
net/wireless/lib80211_crypt_wep.c:99:12: warning: variable 'len' set but
not used [-Wunused-but-set-variable]

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 net/wireless/lib80211_crypt_wep.c |    3 +--
 net/wireless/reg.c                |    2 --
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/net/wireless/lib80211_crypt_wep.c b/net/wireless/lib80211_crypt_wep.c
index e2e8887..2f265e0 100644
--- a/net/wireless/lib80211_crypt_wep.c
+++ b/net/wireless/lib80211_crypt_wep.c
@@ -96,13 +96,12 @@ static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len,
 			       u8 *key, int keylen, void *priv)
 {
 	struct lib80211_wep_data *wep = priv;
-	u32 klen, len;
+	u32 klen;
 	u8 *pos;
 
 	if (skb_headroom(skb) < 4 || skb->len < hdr_len)
 		return -1;
 
-	len = skb->len - hdr_len;
 	pos = skb_push(skb, 4);
 	memmove(pos, pos + 4, hdr_len);
 	pos += hdr_len;
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
index 58d6995..2642d18 100644
--- a/net/wireless/reg.c
+++ b/net/wireless/reg.c
@@ -672,11 +672,9 @@ static int freq_reg_info_regd(struct wiphy *wiphy,
 	for (i = 0; i < regd->n_reg_rules; i++) {
 		const struct ieee80211_reg_rule *rr;
 		const struct ieee80211_freq_range *fr = NULL;
-		const struct ieee80211_power_rule *pr = NULL;
 
 		rr = &regd->reg_rules[i];
 		fr = &rr->freq_range;
-		pr = &rr->power_rule;
 
 		/*
 		 * We only need to know if one frequency rule was
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-04-27  4:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-25 10:26 [PATCH 1/5] wireless: Fix warnings due to -Wunused-but-set-variable Rajkumar Manoharan
2011-04-25 10:26 ` [PATCH 2/5] mac80211: " Rajkumar Manoharan
2011-04-25 10:26 ` [PATCH 3/5] ath9k: " Rajkumar Manoharan
2011-04-25 11:00   ` Sujith
2011-04-25 12:21     ` Rajkumar Manoharan
2011-04-25 10:26 ` [PATCH 4/5] ath9k_htc: " Rajkumar Manoharan
2011-04-26 19:45   ` John W. Linville
2011-04-27  4:52     ` Rajkumar Manoharan
2011-04-25 10:26 ` [PATCH 5/5] ath9k_hw: " Rajkumar Manoharan
2011-04-26 19:47   ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).