From 49e3eea8d9f02208289c54bf788ae3d9e2ab8989 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 25 Dec 2014 13:02:29 +0200 Subject: [PATCH] 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 --- src/crypto/aes-siv.c | 4 ++-- src/drivers/driver_nl80211_capa.c | 6 +++--- wpa_supplicant/scan.c | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/crypto/aes-siv.c b/src/crypto/aes-siv.c index bd619b45b..ff4b823fe 100644 --- a/src/crypto/aes-siv.c +++ b/src/crypto/aes-siv.c @@ -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); diff --git a/src/drivers/driver_nl80211_capa.c b/src/drivers/driver_nl80211_capa.c index 657f38c49..330ebdf58 100644 --- a/src/drivers/driver_nl80211_capa.c +++ b/src/drivers/driver_nl80211_capa.c @@ -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)); } diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 6f4ea085d..b30376031 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -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;