aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-04-13 16:34:13 +0200
committerYang Tse <yangsita@gmail.com>2010-04-13 16:34:13 +0200
commit6432fafa1a5d75ce7fc3dee9602c0890af538ebe (patch)
tree00ba94a878f912bc01b0fbc0525e02150691c8c9 /lib
parent9c7a9f83291d3df70bdebee97521fca776bc3119 (diff)
fix compiler warning: variable might be clobbered by longjmp or vfork
Diffstat (limited to 'lib')
-rw-r--r--lib/hostip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 7106958d1..8f6a52e4f 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -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;