Browse Source

P2P: Fix some int size warnings

When u64 != unsigned long, the compiler will give
some warnings. Fix these.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Johannes Berg 14 years ago
parent
commit
0423d090ce
1 changed files with 4 additions and 3 deletions
  1. 4 3
      wpa_supplicant/ctrl_iface.c

+ 4 - 3
wpa_supplicant/ctrl_iface.c

@@ -2155,7 +2155,8 @@ static int p2p_ctrl_serv_disc_req(struct wpa_supplicant *wpa_s, char *cmd,
 		if (*pos != ' ')
 			return -1;
 		pos++;
-		ref = (u64) wpas_p2p_sd_request_upnp(wpa_s, dst, version, pos);
+		ref = (unsigned long) wpas_p2p_sd_request_upnp(wpa_s, dst,
+							       version, pos);
 	} else {
 		len = os_strlen(pos);
 		if (len & 1)
@@ -2169,7 +2170,7 @@ static int p2p_ctrl_serv_disc_req(struct wpa_supplicant *wpa_s, char *cmd,
 			return -1;
 		}
 
-		ref = (u64) wpas_p2p_sd_request(wpa_s, dst, tlvs);
+		ref = (unsigned long) wpas_p2p_sd_request(wpa_s, dst, tlvs);
 		wpabuf_free(tlvs);
 	}
 	res = os_snprintf(buf, buflen, "%llx", (long long unsigned) ref);
@@ -2187,7 +2188,7 @@ static int p2p_ctrl_serv_disc_cancel_req(struct wpa_supplicant *wpa_s,
 	if (sscanf(cmd, "%llx", &val) != 1)
 		return -1;
 	req = val;
-	return wpas_p2p_sd_cancel_request(wpa_s, (void *) req);
+	return wpas_p2p_sd_cancel_request(wpa_s, (void *) (unsigned long) req);
 }