Workaround number of compiler warnings with newer MinGW version
authorJouni Malinen <j@w1.fi>
Wed, 10 Dec 2008 22:56:37 +0000 (00:56 +0200)
committerJouni Malinen <j@w1.fi>
Wed, 10 Dec 2008 22:56:37 +0000 (00:56 +0200)
src/drivers/ndis_events.c
src/utils/eloop_win.c
src/wps/wps_registrar.c
wpa_supplicant/ctrl_iface_named_pipe.c

index 485e4ec..f6eaa7c 100644 (file)
@@ -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);
index a1ccd94..c95aa76 100644 (file)
@@ -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;
index 01fa767..a2e8893 100644 (file)
@@ -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;
index af451eb..e8b53b1 100644 (file)
@@ -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 "