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 *"
This commit is contained in:
Yang Tse 2009-04-24 10:38:12 +00:00
parent ab1e54375f
commit 651b4b9efa
1 changed files with 8 additions and 6 deletions

View File

@ -68,18 +68,20 @@
* any function call which actually allocates a Curl_addrinfo struct. * any function call which actually allocates a Curl_addrinfo struct.
*/ */
void
Curl_freeaddrinfo(Curl_addrinfo *cahead)
{
#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \ #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
defined(__unix__) && defined(__i386__) defined(__unix__) && defined(__i386__)
/* workaround icc 9.1 optimizer issue */ /* workaround icc 9.1 optimizer issue */
volatile Curl_addrinfo * volatile canext; # define vqualifier volatile
Curl_addrinfo *ca;
#else #else
Curl_addrinfo *ca, *canext; # define vqualifier
#endif #endif
void
Curl_freeaddrinfo(Curl_addrinfo *cahead)
{
Curl_addrinfo *vqualifier canext;
Curl_addrinfo *ca;
for(ca = cahead; ca != NULL; ca = canext) { for(ca = cahead; ca != NULL; ca = canext) {
if(ca->ai_addr) if(ca->ai_addr)