Browse Source

Workaround number of compiler warnings with newer MinGW version

Jouni Malinen 16 years ago
parent
commit
9e72e1d356

+ 3 - 2
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);

+ 1 - 2
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;

+ 1 - 1
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;

+ 2 - 1
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 "