diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-04-25 06:26:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-10 15:53:47 -0400 |
commit | 6572e91d5fa61bb3f879a00b96d763c566ced6cb (patch) | |
tree | 90702b81df68da39c5475af3555c624871be209a /net/wireless | |
parent | d21844c7c23a71acea6fd68365b09b40e252a876 (diff) |
wireless: Fix warnings due to -Wunused-but-set-variable
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>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/lib80211_crypt_wep.c | 3 | ||||
-rw-r--r-- | 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 e2e88878ba35..2f265e033ae2 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, | |||
96 | u8 *key, int keylen, void *priv) | 96 | u8 *key, int keylen, void *priv) |
97 | { | 97 | { |
98 | struct lib80211_wep_data *wep = priv; | 98 | struct lib80211_wep_data *wep = priv; |
99 | u32 klen, len; | 99 | u32 klen; |
100 | u8 *pos; | 100 | u8 *pos; |
101 | 101 | ||
102 | if (skb_headroom(skb) < 4 || skb->len < hdr_len) | 102 | if (skb_headroom(skb) < 4 || skb->len < hdr_len) |
103 | return -1; | 103 | return -1; |
104 | 104 | ||
105 | len = skb->len - hdr_len; | ||
106 | pos = skb_push(skb, 4); | 105 | pos = skb_push(skb, 4); |
107 | memmove(pos, pos + 4, hdr_len); | 106 | memmove(pos, pos + 4, hdr_len); |
108 | pos += hdr_len; | 107 | pos += hdr_len; |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 8982053f9961..798cb4cd0702 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -672,11 +672,9 @@ static int freq_reg_info_regd(struct wiphy *wiphy, | |||
672 | for (i = 0; i < regd->n_reg_rules; i++) { | 672 | for (i = 0; i < regd->n_reg_rules; i++) { |
673 | const struct ieee80211_reg_rule *rr; | 673 | const struct ieee80211_reg_rule *rr; |
674 | const struct ieee80211_freq_range *fr = NULL; | 674 | const struct ieee80211_freq_range *fr = NULL; |
675 | const struct ieee80211_power_rule *pr = NULL; | ||
676 | 675 | ||
677 | rr = ®d->reg_rules[i]; | 676 | rr = ®d->reg_rules[i]; |
678 | fr = &rr->freq_range; | 677 | fr = &rr->freq_range; |
679 | pr = &rr->power_rule; | ||
680 | 678 | ||
681 | /* | 679 | /* |
682 | * We only need to know if one frequency rule was | 680 | * We only need to know if one frequency rule was |