]> granicus.if.org Git - curl/commitdiff
fix potential use of uninitialized variables
authorAndrew Krieger <akrieger@fb.com>
Sat, 4 Mar 2017 00:17:24 +0000 (16:17 -0800)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 4 Mar 2017 20:37:03 +0000 (21:37 +0100)
MSVC with LTCG detects this at warning level 4.

Closes #1304

lib/dict.c
lib/gopher.c

index 69defc4cc8fe4e995cd3d43e95ccb989623b67e4..451ec389a1bdfa1ba5f402e9feea13d8eba63652 100644 (file)
@@ -92,7 +92,7 @@ const struct Curl_handler Curl_handler_dict = {
 
 static char *unescape_word(struct Curl_easy *data, const char *inputbuff)
 {
-  char *newp;
+  char *newp = NULL;
   char *dictp;
   char *ptr;
   size_t len;
index 6b57d35199f42e1117d85c5582de874f9f7ab326..e6d2746487c33e00de430a55942641c536d2c758 100644 (file)
@@ -78,7 +78,7 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
 
   curl_off_t *bytecount = &data->req.bytecount;
   char *path = data->state.path;
-  char *sel;
+  char *sel = NULL;
   char *sel_org = NULL;
   ssize_t amount, k;
   size_t len;