From f3833aee90edbebd692669ead38cbf550a8cb007 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 6 Jun 2008 14:17:03 +0300 Subject: [PATCH] Fix compile warnings on 64-bit systems Don't cast pointers to int in definitions of PRISM2_HOSTAPD_RID_HDR_LEN and PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN. Use size_t instead. That's actually what the code needs. --- hostapd/hostap_common.h | 4 ++-- src/drivers/driver_hostap.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hostapd/hostap_common.h b/hostapd/hostap_common.h index 1e38df38f..5a57dca46 100644 --- a/hostapd/hostap_common.h +++ b/hostapd/hostap_common.h @@ -147,9 +147,9 @@ enum { #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 #define PRISM2_HOSTAPD_RID_HDR_LEN \ -((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) +((size_t) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ -((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) +((size_t) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) /* Maximum length for algorithm names (-1 for nul termination) used in ioctl() */ diff --git a/src/drivers/driver_hostap.h b/src/drivers/driver_hostap.h index a83322f7e..a2508ed92 100644 --- a/src/drivers/driver_hostap.h +++ b/src/drivers/driver_hostap.h @@ -84,9 +84,9 @@ enum { #define PRISM2_HOSTAPD_MAX_BUF_SIZE 1024 #define PRISM2_HOSTAPD_RID_HDR_LEN \ -((int) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) +((size_t) (&((struct prism2_hostapd_param *) 0)->u.rid.data)) #define PRISM2_HOSTAPD_GENERIC_ELEMENT_HDR_LEN \ -((int) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) +((size_t) (&((struct prism2_hostapd_param *) 0)->u.generic_elem.data)) /* Maximum length for algorithm names (-1 for nul termination) used in ioctl() */