From 93567071b744975e191c5732d9cbe4b0d529f4c9 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Tue, 25 Apr 2017 09:19:59 +0200 Subject: if2ip: fix -Wcast-align warning Follow-up to 119037325de02579f5c58256ca2ed2a0aa592c86, which fixed the warning in the HAVE_GETIFADDRS block, but not in the HAVE_IOCTL_SIOCGIFADDR block. --- lib/if2ip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/if2ip.c b/lib/if2ip.c index d876615ea..4de81be60 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -239,7 +239,7 @@ if2ip_result_t Curl_if2ip(int af, unsigned int remote_scope, return IF2IP_NOT_FOUND; } - s = (struct sockaddr_in *)&req.ifr_addr; + s = (struct sockaddr_in *)(void *)&req.ifr_addr; memcpy(&in, &s->sin_addr, sizeof(in)); Curl_inet_ntop(s->sin_family, &in, buf, buf_size); -- cgit v1.2.3