]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
initialize pending_ms to zero to avoid compiler warning:
authorYang Tse <yangsita@gmail.com>
Fri, 20 Apr 2007 01:58:15 +0000 (01:58 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 20 Apr 2007 01:58:15 +0000 (01:58 +0000)
'pending_ms' may be used uninitialized in this function

lib/select.c

index 9d75e77dd7816c48a0c6e2b990ba9d9843f96957..3bfffa9c8b9df2c2d208cdfb1ad421ee60634b7a 100644 (file)
@@ -184,7 +184,7 @@ int Curl_socket_ready(curl_socket_t readfd, curl_socket_t writefd,
   curl_socket_t maxfd;
 #endif
   struct timeval initial_tv;
-  int pending_ms;
+  int pending_ms = 0;
   int error;
   int r;
   int ret;
@@ -361,7 +361,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, int timeout_ms)
   struct timeval initial_tv;
   bool fds_none = TRUE;
   unsigned int i;
-  int pending_ms;
+  int pending_ms = 0;
   int error;
   int r;
 
@@ -505,7 +505,7 @@ int Curl_select(int nfds,
 {
   struct timeval initial_tv;
   int timeout_ms;
-  int pending_ms;
+  int pending_ms = 0;
   int error;
   int r;
 #ifdef HAVE_POLL_FINE