Commit 6572e91d authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

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: default avatarRajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d21844c7
...@@ -96,13 +96,12 @@ static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len, ...@@ -96,13 +96,12 @@ static int lib80211_wep_build_iv(struct sk_buff *skb, int hdr_len,
u8 *key, int keylen, void *priv) u8 *key, int keylen, void *priv)
{ {
struct lib80211_wep_data *wep = priv; struct lib80211_wep_data *wep = priv;
u32 klen, len; u32 klen;
u8 *pos; u8 *pos;
if (skb_headroom(skb) < 4 || skb->len < hdr_len) if (skb_headroom(skb) < 4 || skb->len < hdr_len)
return -1; return -1;
len = skb->len - hdr_len;
pos = skb_push(skb, 4); pos = skb_push(skb, 4);
memmove(pos, pos + 4, hdr_len); memmove(pos, pos + 4, hdr_len);
pos += hdr_len; pos += hdr_len;
......
...@@ -672,11 +672,9 @@ static int freq_reg_info_regd(struct wiphy *wiphy, ...@@ -672,11 +672,9 @@ static int freq_reg_info_regd(struct wiphy *wiphy,
for (i = 0; i < regd->n_reg_rules; i++) { for (i = 0; i < regd->n_reg_rules; i++) {
const struct ieee80211_reg_rule *rr; const struct ieee80211_reg_rule *rr;
const struct ieee80211_freq_range *fr = NULL; const struct ieee80211_freq_range *fr = NULL;
const struct ieee80211_power_rule *pr = NULL;
rr = &regd->reg_rules[i]; rr = &regd->reg_rules[i];
fr = &rr->freq_range; fr = &rr->freq_range;
pr = &rr->power_rule;
/* /*
* We only need to know if one frequency rule was * We only need to know if one frequency rule was
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment