aboutsummaryrefslogtreecommitdiff
path: root/lib/curl_addrinfo.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-22 15:03:05 +0000
committerYang Tse <yangsita@gmail.com>2009-04-22 15:03:05 +0000
commitbc5677a47b242cea075e6761bd744116f8c3f710 (patch)
tree0d2752fd16c81c3714e3a8b01152e2387a4cb864 /lib/curl_addrinfo.c
parent137ef367578d01b564ef19d217c2b3f78c672f20 (diff)
Disable optimizations when compiling function Curl_freeaddrinfo() with icc 9.1 on unix IA32.
Previous 'volatile' variables workaround proved useful, but it triggered the following warning: warning #167: argument of type "volatile Curl_addrinfo *" is incompatible with parameter of type "void *"
Diffstat (limited to 'lib/curl_addrinfo.c')
-rw-r--r--lib/curl_addrinfo.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index 8c85f8865..4e1eb4c26 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -68,17 +68,15 @@
* any function call which actually allocates a Curl_addrinfo struct.
*/
+#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
+ defined(__unix__) && defined(__i386__)
+# pragma optimize("", off)
+#endif
+
void
Curl_freeaddrinfo(Curl_addrinfo *cahead)
{
-#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
- defined(__unix__) && defined(__i386__)
- /* workaround icc 9.1 optimizer issue */
- volatile Curl_addrinfo * volatile ca;
- volatile Curl_addrinfo * volatile canext;
-#else
Curl_addrinfo *ca, *canext;
-#endif
for(ca = cahead; ca != NULL; ca = canext) {
@@ -94,6 +92,10 @@ Curl_freeaddrinfo(Curl_addrinfo *cahead)
}
}
+#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
+ defined(__unix__) && defined(__i386__)
+# pragma optimize("", on)
+#endif
#ifdef HAVE_GETADDRINFO
/*