compiler warnings: potentially uninitialized variables
authorMarcel Raad <marcelraad@users.sf.net>
Fri, 4 Jul 2014 16:26:57 +0000 (18:26 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 4 Jul 2014 23:42:10 +0000 (01:42 +0200)
... pointed out by MSVC2013

Bug: http://curl.haxx.se/bug/view.cgi?id=1391

lib/connect.c
lib/easy.c
lib/url.c

index de78c33..826ec25 100644 (file)
@@ -551,7 +551,7 @@ static CURLcode trynextip(struct connectdata *conn,
 
   if(sockindex == FIRSTSOCKET) {
     Curl_addrinfo *ai = NULL;
-    int family;
+    int family = AF_UNSPEC;
 
     if(conn->tempaddr[tempindex]) {
       /* find next address in the same protocol family */
index 078e9cb..160712e 100644 (file)
@@ -674,7 +674,7 @@ static CURLcode easy_transfer(CURLM *multi)
                            curl_multi_wait() without any filedescriptors */
 
   while(!done && !mcode) {
-    int still_running;
+    int still_running = 0;
     int ret;
 
     before = curlx_tvnow();
index 5209c8d..e09a11a 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -5137,7 +5137,7 @@ static CURLcode create_conn(struct SessionHandle *data,
   char *proxy = NULL;
   bool prot_missing = FALSE;
   bool no_connections_available = FALSE;
-  bool force_reuse;
+  bool force_reuse = FALSE;
   size_t max_host_connections = Curl_multi_max_host_connections(data->multi);
   size_t max_total_connections = Curl_multi_max_total_connections(data->multi);