aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-09-27 07:46:06 (GMT)
committerJouni Malinen <j@w1.fi>2008-09-27 07:46:06 (GMT)
commitfa2ec7eb634a0ed9dd9885d38ab6a49d23d218a1 (patch)
tree20f867e4a941fb9badfa51c6f4a218a6293dd101
parent9cf32261ee383854e53f49d4fa201b4e5bb848d9 (diff)
downloadhostap-fa2ec7eb634a0ed9dd9885d38ab6a49d23d218a1.zip
hostap-fa2ec7eb634a0ed9dd9885d38ab6a49d23d218a1.tar.gz
hostap-fa2ec7eb634a0ed9dd9885d38ab6a49d23d218a1.tar.bz2
Silenced compiler warnings on size_t printf format and shadowed variables
-rw-r--r--src/drivers/driver_ralink.c5
-rw-r--r--src/eap_common/eap_gpsk_common.c6
-rw-r--r--src/eap_peer/eap_fast_pac.c8
-rw-r--r--src/eap_peer/eap_gpsk.c13
-rw-r--r--src/tls/tlsv1_client_read.c4
-rw-r--r--wpa_supplicant/mlme.c4
6 files changed, 22 insertions, 18 deletions
diff --git a/src/drivers/driver_ralink.c b/src/drivers/driver_ralink.c
index 6d99b3f..e9313cb 100644
--- a/src/drivers/driver_ralink.c
+++ b/src/drivers/driver_ralink.c
@@ -288,8 +288,9 @@ static void wpa_driver_ralink_event_pmkid(struct wpa_driver_ralink_data *drv,
os_memset(&event, 0, sizeof(event));
for (i = 0; i < pmkid->NumCandidates; i++) {
PMKID_CANDIDATE *p = &pmkid->CandidateList[i];
- wpa_printf(MSG_DEBUG, "RALINK: %d: " MACSTR " Flags 0x%x",
- i, MAC2STR(p->BSSID), (int) p->Flags);
+ wpa_printf(MSG_DEBUG, "RALINK: %lu: " MACSTR " Flags 0x%x",
+ (unsigned long) i, MAC2STR(p->BSSID),
+ (int) p->Flags);
os_memcpy(event.pmkid_candidate.bssid, p->BSSID, ETH_ALEN);
event.pmkid_candidate.index = i;
event.pmkid_candidate.preauth =
diff --git a/src/eap_common/eap_gpsk_common.c b/src/eap_common/eap_gpsk_common.c
index 08bd950..414610c 100644
--- a/src/eap_common/eap_gpsk_common.c
+++ b/src/eap_common/eap_gpsk_common.c
@@ -123,7 +123,7 @@ static int eap_gpsk_derive_keys_helper(u32 csuite_specifier,
{
u8 mk[32], *pos, *data;
size_t data_len, mk_len;
- int (*gkdf)(const u8 *psk, const u8 *data, size_t data_len,
+ int (*gkdf)(const u8 *_psk, const u8 *_data, size_t _data_len,
u8 *buf, size_t len);
gkdf = NULL;
@@ -377,8 +377,8 @@ static int eap_gpsk_compute_mic_aes(const u8 *sk, size_t sk_len,
const u8 *data, size_t len, u8 *mic)
{
if (sk_len != 16) {
- wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid SK length %d for "
- "AES-CMAC MIC", sk_len);
+ wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid SK length %lu for "
+ "AES-CMAC MIC", (unsigned long) sk_len);
return -1;
}
diff --git a/src/eap_peer/eap_fast_pac.c b/src/eap_peer/eap_fast_pac.c
index 1583f49..a052ee1 100644
--- a/src/eap_peer/eap_fast_pac.c
+++ b/src/eap_peer/eap_fast_pac.c
@@ -834,8 +834,8 @@ int eap_fast_load_pac_bin(struct eap_sm *sm, struct eap_fast_pac **pac_root,
if (blob == NULL)
os_free(buf);
- wpa_printf(MSG_DEBUG, "EAP-FAST: Read %d PAC entries from '%s' (bin)",
- count, pac_file);
+ wpa_printf(MSG_DEBUG, "EAP-FAST: Read %lu PAC entries from '%s' (bin)",
+ (unsigned long) count, pac_file);
return 0;
@@ -909,8 +909,8 @@ int eap_fast_save_pac_bin(struct eap_sm *sm, struct eap_fast_pac *pac_root,
return -1;
}
- wpa_printf(MSG_DEBUG, "EAP-FAST: Wrote %d PAC entries into '%s' (bin)",
- count, pac_file);
+ wpa_printf(MSG_DEBUG, "EAP-FAST: Wrote %lu PAC entries into '%s' "
+ "(bin)", (unsigned long) count, pac_file);
return 0;
}
diff --git a/src/eap_peer/eap_gpsk.c b/src/eap_peer/eap_gpsk.c
index 963f41d..879dde6 100644
--- a/src/eap_peer/eap_gpsk.c
+++ b/src/eap_peer/eap_gpsk.c
@@ -238,8 +238,8 @@ const u8 * eap_gpsk_process_csuite_list(struct eap_sm *sm,
return NULL;
}
if (*list_len == 0 || (*list_len % sizeof(struct eap_gpsk_csuite))) {
- wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid CSuite_List len %d",
- *list_len);
+ wpa_printf(MSG_DEBUG, "EAP-GPSK: Invalid CSuite_List len %lu",
+ (unsigned long) *list_len);
return NULL;
}
*list = pos;
@@ -521,7 +521,9 @@ const u8 * eap_gpsk_validate_gpsk_3_mic(struct eap_gpsk_data *data,
miclen = eap_gpsk_mic_len(data->vendor, data->specifier);
if (end - pos < (int) miclen) {
wpa_printf(MSG_DEBUG, "EAP-GPSK: Message too short for MIC "
- "(left=%d miclen=%d)", end - pos, miclen);
+ "(left=%lu miclen=%lu)",
+ (unsigned long) (end - pos),
+ (unsigned long) miclen);
return NULL;
}
if (eap_gpsk_compute_mic(data->sk, data->sk_len, data->vendor,
@@ -572,8 +574,9 @@ static struct wpabuf * eap_gpsk_process_gpsk_3(struct eap_sm *sm,
return NULL;
}
if (pos != end) {
- wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %d bytes of extra "
- "data in the end of GPSK-2", end - pos);
+ wpa_printf(MSG_DEBUG, "EAP-GPSK: Ignored %lu bytes of extra "
+ "data in the end of GPSK-2",
+ (unsigned long) (end - pos));
}
resp = eap_gpsk_send_gpsk_4(data, eap_get_id(reqData));
diff --git a/src/tls/tlsv1_client_read.c b/src/tls/tlsv1_client_read.c
index 5767fee..ee20330 100644
--- a/src/tls/tlsv1_client_read.c
+++ b/src/tls/tlsv1_client_read.c
@@ -422,8 +422,8 @@ static int tlsv1_process_diffie_hellman(struct tlsv1_client *conn,
conn->dh_p_len = WPA_GET_BE16(pos);
pos += 2;
if (conn->dh_p_len == 0 || end - pos < (int) conn->dh_p_len) {
- wpa_printf(MSG_DEBUG, "TLSv1: Invalid dh_p length %d",
- conn->dh_p_len);
+ wpa_printf(MSG_DEBUG, "TLSv1: Invalid dh_p length %lu",
+ (unsigned long) conn->dh_p_len);
goto fail;
}
conn->dh_p = os_malloc(conn->dh_p_len);
diff --git a/wpa_supplicant/mlme.c b/wpa_supplicant/mlme.c
index 6cf51aa..b916122 100644
--- a/wpa_supplicant/mlme.c
+++ b/wpa_supplicant/mlme.c
@@ -3123,8 +3123,8 @@ int ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
len += 1 + sizeof(mgmt->u.action.u.ft_action_req) + ies_len;
wpa_printf(MSG_DEBUG, "MLME: Send FT Action Frame: Action=%d "
- "Target AP=" MACSTR " body_len=%d",
- action, MAC2STR(target_ap), ies_len);
+ "Target AP=" MACSTR " body_len=%lu",
+ action, MAC2STR(target_ap), (unsigned long) ies_len);
res = ieee80211_sta_tx(wpa_s, buf, len);
os_free(buf);