]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RADIUS client: Fix void-pointer-to-enum-cast warning
authorJoshua Emele <jemele@chromium.org>
Thu, 22 Apr 2021 22:59:40 +0000 (22:59 +0000)
committerJouni Malinen <j@w1.fi>
Thu, 19 Aug 2021 08:19:37 +0000 (11:19 +0300)
Found using x86_64-cros-linux-gnu-clang (Chromium OS
12.0_pre416183_p20210305-r3 clang version 12.0.0):

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

Signed-off-by: Joshua Emele <jemele@chromium.org>
src/radius/radius_client.c

index 4f0ff07547da02249b527b5d1946e3f22d33cb81..ee9e46d2aa01cb799c5ae3daab619443a536bf06 100644 (file)
@@ -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 = (uintptr_t) sock_ctx;
        int len, roundtrip;
        unsigned char buf[RADIUS_MAX_MSG_LEN];
        struct msghdr msghdr = {0};