diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-11 15:53:29 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-11 15:53:29 (GMT) |
commit | 37c555381899b52c7ddbe3aa5838101ba571fdf2 (patch) | |
tree | a85f79b03d00d3812c4bf3e24eb81eac92a06892 /Source/CTest | |
parent | 031e956adc8411bb5e0f1603670dfde13bb59f54 (diff) | |
download | CMake-37c555381899b52c7ddbe3aa5838101ba571fdf2.zip CMake-37c555381899b52c7ddbe3aa5838101ba571fdf2.tar.gz CMake-37c555381899b52c7ddbe3aa5838101ba571fdf2.tar.bz2 |
COMP: Remove alignment warning
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/Curl/inet_ntop.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/CTest/Curl/inet_ntop.c b/Source/CTest/Curl/inet_ntop.c index 6b15c02..6809a92 100644 --- a/Source/CTest/Curl/inet_ntop.c +++ b/Source/CTest/Curl/inet_ntop.c @@ -59,7 +59,13 @@ static const char *inet_ntop4 (const u_char *src, char *dst, size_t size) #ifdef HAVE_INET_NTOA_R return inet_ntoa_r(*(struct in_addr*)src, dst, size); #else - const char *addr = inet_ntoa(*(struct in_addr*)src); + union { + const u_char* uch; + const struct in_addr* iad; + } srcaddr; + const char *addr; + srcaddr.uch = src; + addr = inet_ntoa(*srcaddr.iad); if (strlen(addr) >= size) { |