]> granicus.if.org Git - curl/commitdiff
fix compiler warning: variable might be clobbered by longjmp or vfork
authorYang Tse <yangsita@gmail.com>
Tue, 13 Apr 2010 14:34:13 +0000 (16:34 +0200)
committerYang Tse <yangsita@gmail.com>
Tue, 13 Apr 2010 14:34:13 +0000 (16:34 +0200)
lib/hostip.c

index 7106958d1d0478e3168cc632166697da11210225..8f6a52e4f00ad03cb7a61b6e62486e7551705caf 100644 (file)
@@ -542,7 +542,7 @@ int Curl_resolv_timeout(struct connectdata *conn,
 #ifdef USE_ALARM_TIMEOUT
 #ifdef HAVE_SIGACTION
   struct sigaction keep_sigact;   /* store the old struct here */
-  bool keep_copysig=FALSE;        /* did copy it? */
+  volatile bool keep_copysig = FALSE; /* wether old sigact has been saved */
   struct sigaction sigact;
 #else
 #ifdef HAVE_SIGNAL
@@ -550,7 +550,7 @@ int Curl_resolv_timeout(struct connectdata *conn,
 #endif /* HAVE_SIGNAL */
 #endif /* HAVE_SIGACTION */
   volatile long timeout;
-  unsigned int prev_alarm=0;
+  volatile unsigned int prev_alarm = 0;
   struct SessionHandle *data = conn->data;
 #endif /* USE_ALARM_TIMEOUT */
   int rc;