[PATCH] RADIUS client: Fix void-pointer-to-enum-cast warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Found using x86_64-cros-linux-gnu-clang:

radius_client.c:818:24: warning: cast to smaller integer ...
        RadiusType msg_type = (RadiusType) sock_ctx;

Signed-off-by: Joshua Emele <jemele@xxxxxxxxxxxx>
---
 src/radius/radius_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/radius/radius_client.c b/src/radius/radius_client.c
index 4f0ff0754..d0cfc9533 100644
--- a/src/radius/radius_client.c
+++ b/src/radius/radius_client.c
@@ -815,7 +815,7 @@ static void radius_client_receive(int sock, void *eloop_ctx, void *sock_ctx)
 {
 	struct radius_client_data *radius = eloop_ctx;
 	struct hostapd_radius_servers *conf = radius->conf;
-	RadiusType msg_type = (RadiusType) sock_ctx;
+	RadiusType msg_type = (RadiusType)(uintptr_t) sock_ctx;
 	int len, roundtrip;
 	unsigned char buf[RADIUS_MAX_MSG_LEN];
 	struct msghdr msghdr = {0};
-- 
2.31.1.368.gbe11c130af-goog


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux