Avoid type punning warnings in b_addr.c
authorMatt Caswell <matt@openssl.org>
Wed, 15 Jun 2016 10:50:09 +0000 (11:50 +0100)
committerMatt Caswell <matt@openssl.org>
Sat, 18 Jun 2016 14:34:03 +0000 (15:34 +0100)
RT4378

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/bio/b_addr.c

index 3a9a00c..e5352db 100644 (file)
@@ -708,12 +708,12 @@ int BIO_lookup(const char *host, const char *service,
         /* Windows doesn't seem to have in_addr_t */
 #ifdef OPENSSL_SYS_WINDOWS
         static uint32_t he_fallback_address;
         /* Windows doesn't seem to have in_addr_t */
 #ifdef OPENSSL_SYS_WINDOWS
         static uint32_t he_fallback_address;
-        static const uint32_t *he_fallback_addresses[] =
-            { &he_fallback_address, NULL };
+        static const char *he_fallback_addresses[] =
+            { (char *)&he_fallback_address, NULL };
 #else
         static in_addr_t he_fallback_address;
 #else
         static in_addr_t he_fallback_address;
-        static const in_addr_t *he_fallback_addresses[] =
-            { &he_fallback_address, NULL };
+        static const char *he_fallback_addresses[] =
+            { (char *)&he_fallback_address, NULL };
 #endif
         static const struct hostent he_fallback =
             { NULL, NULL, AF_INET, sizeof(he_fallback_address),
 #endif
         static const struct hostent he_fallback =
             { NULL, NULL, AF_INET, sizeof(he_fallback_address),