aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-10 22:56:37 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-10 22:56:37 (GMT)
commit9e72e1d35683389bf5eebf88cb51ef042dd71901 (patch)
treee914a6275fcca908bada85dbea01ec1542182c7e
parent702c349e5ea055e57efa82479ac43296fafdcde7 (diff)
downloadhostap-9e72e1d35683389bf5eebf88cb51ef042dd71901.zip
hostap-9e72e1d35683389bf5eebf88cb51ef042dd71901.tar.gz
hostap-9e72e1d35683389bf5eebf88cb51ef042dd71901.tar.bz2
Workaround number of compiler warnings with newer MinGW version
-rw-r--r--src/drivers/ndis_events.c5
-rw-r--r--src/utils/eloop_win.c3
-rw-r--r--src/wps/wps_registrar.c2
-rw-r--r--wpa_supplicant/ctrl_iface_named_pipe.c3
4 files changed, 7 insertions, 6 deletions
diff --git a/src/drivers/ndis_events.c b/src/drivers/ndis_events.c
index 485e4ec..f6eaa7c 100644
--- a/src/drivers/ndis_events.c
+++ b/src/drivers/ndis_events.c
@@ -281,7 +281,7 @@ static void ndis_events_media_specific(struct ndis_events_data *events,
SafeArrayGetElement(V_ARRAY(&vt), &k, &ch);
*pos++ = ch;
}
- wpa_hexdump(MSG_DEBUG, "MediaSpecificEvent", data, data_len);
+ wpa_hexdump(MSG_DEBUG, "MediaSpecificEvent", (u8 *) data, data_len);
VariantClear(&vt);
@@ -752,7 +752,8 @@ ndis_events_init(HANDLE *read_pipe, HANDLE *event_avail,
}
hr = CoCreateInstance(&CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER,
- &IID_IWbemLocator, (LPVOID *) &events->pLoc);
+ &IID_IWbemLocator,
+ (LPVOID *) (void *) &events->pLoc);
if (FAILED(hr)) {
wpa_printf(MSG_ERROR, "CoCreateInstance() failed - returned "
"0x%x", (int) hr);
diff --git a/src/utils/eloop_win.c b/src/utils/eloop_win.c
index a1ccd94..c95aa76 100644
--- a/src/utils/eloop_win.c
+++ b/src/utils/eloop_win.c
@@ -463,12 +463,11 @@ void eloop_run(void)
while (!eloop.terminate &&
(eloop.timeout || eloop.reader_count > 0 ||
eloop.event_count > 0)) {
+ tv.sec = tv.usec = 0;
if (eloop.timeout) {
os_get_time(&now);
if (os_time_before(&now, &eloop.timeout->time))
os_time_sub(&eloop.timeout->time, &now, &tv);
- else
- tv.sec = tv.usec = 0;
}
count = 0;
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c
index 01fa767..a2e8893 100644
--- a/src/wps/wps_registrar.c
+++ b/src/wps/wps_registrar.c
@@ -659,7 +659,7 @@ static int wps_set_ie(struct wps_registrar *reg)
static int wps_get_dev_password(struct wps_data *wps)
{
const u8 *pin;
- size_t pin_len;
+ size_t pin_len = 0;
os_free(wps->dev_password);
wps->dev_password = NULL;
diff --git a/wpa_supplicant/ctrl_iface_named_pipe.c b/wpa_supplicant/ctrl_iface_named_pipe.c
index af451eb..e8b53b1 100644
--- a/wpa_supplicant/ctrl_iface_named_pipe.c
+++ b/wpa_supplicant/ctrl_iface_named_pipe.c
@@ -412,7 +412,8 @@ static int ctrl_iface_parse(struct ctrl_iface_priv *priv, const char *params)
return -1;
if (!ConvertStringSecurityDescriptorToSecurityDescriptor(
t_sddl, SDDL_REVISION_1,
- (PSECURITY_DESCRIPTOR *) &priv->attr.lpSecurityDescriptor,
+ (PSECURITY_DESCRIPTOR *) (void *)
+ &priv->attr.lpSecurityDescriptor,
NULL)) {
os_free(t_sddl);
wpa_printf(MSG_ERROR, "CTRL: SDDL='%s' - could not convert to "