Avoid -Wshadow warnings from older gcc versions

It looks like gcc 4.8.2 would warn about these with -Wshadow, but 4.6.3
did.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2014-12-25 13:02:29 +02:00
parent a193231dfb
commit 49e3eea8d9
3 changed files with 8 additions and 8 deletions

View file

@ -50,7 +50,7 @@ static void xorend(u8 *a, int alen, const u8 *b, int blen)
}
static void pad(u8 *pad, const u8 *addr, size_t len)
static void pad_block(u8 *pad, const u8 *addr, size_t len)
{
os_memset(pad, 0, AES_BLOCK_SIZE);
os_memcpy(pad, addr, len);
@ -99,7 +99,7 @@ int aes_s2v(const u8 *key, size_t num_elem, const u8 *addr[],
}
dbl(tmp);
pad(tmp2, addr[i], len[i]);
pad_block(tmp2, addr[i], len[i]);
xor(tmp, tmp2);
return omac1_aes_128(key, tmp, sizeof(tmp), mac);

View file

@ -723,10 +723,10 @@ static int features_info_handler(struct nl_msg *msg, void *arg)
static int check_feature(enum qca_wlan_vendor_features feature,
struct features_info *info)
{
size_t index = feature / 8;
size_t idx = feature / 8;
return (index < info->flags_len) &&
(info->flags[index] & BIT(feature % 8));
return (idx < info->flags_len) &&
(info->flags[idx] & BIT(feature % 8));
}

View file

@ -605,7 +605,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
{
struct wpa_supplicant *wpa_s = eloop_ctx;
struct wpa_ssid *ssid;
int ret, p2p_in_progress;
int ret, p2p_in_prog;
struct wpabuf *extra_ie = NULL;
struct wpa_driver_scan_params params;
struct wpa_driver_scan_params *scan_params;
@ -658,8 +658,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
return;
}
p2p_in_progress = wpas_p2p_in_progress(wpa_s);
if (p2p_in_progress && p2p_in_progress != 2) {
p2p_in_prog = wpas_p2p_in_progress(wpa_s);
if (p2p_in_prog && p2p_in_prog != 2) {
wpa_dbg(wpa_s, MSG_DEBUG, "Delay station mode scan while P2P operation is in progress");
wpa_supplicant_req_scan(wpa_s, 5, 0);
return;