aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-24 10:38:12 +0000
committerYang Tse <yangsita@gmail.com>2009-04-24 10:38:12 +0000
commit651b4b9efacfb3742682b8f1d8c97feb3255e2db (patch)
treed8b657adab80861a28c90f60cb5b839b67c9acfb
parentab1e54375f36dc4e83df6803efe5fa80ed21b955 (diff)
Try a simpler variation of the 'volatile' variables icc 9.1 on unix IA32 workaround.
Previous workaround proved useful, but triggered the following warning: warning #556: a value of type "volatile Curl_addrinfo *" cannot be assigned to an entity of type "Curl_addrinfo *"
-rw-r--r--lib/curl_addrinfo.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index 14b2a438b..9d56e6a2f 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -68,18 +68,20 @@
* any function call which actually allocates a Curl_addrinfo struct.
*/
-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 canext;
- Curl_addrinfo *ca;
+# define vqualifier volatile
#else
- Curl_addrinfo *ca, *canext;
+# define vqualifier
#endif
+void
+Curl_freeaddrinfo(Curl_addrinfo *cahead)
+{
+ Curl_addrinfo *vqualifier canext;
+ Curl_addrinfo *ca;
+
for(ca = cahead; ca != NULL; ca = canext) {
if(ca->ai_addr)