]> granicus.if.org Git - curl/commitdiff
curl: "Function call argument is an uninitialized value"
authorDaniel Stenberg <daniel@haxx.se>
Tue, 12 Feb 2019 09:09:09 +0000 (10:09 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 12 Feb 2019 13:39:04 +0000 (14:39 +0100)
Follow-up to cac0e4a6ad14b42471eb

Detected by scan-build
Closes #3560

src/tool_setopt.c

index 878bea2b4703905816227a3be18a32716a5c2311..26102d3129d05ae3cc51e33fdaf81c7fe5e740cb 100644 (file)
@@ -419,14 +419,14 @@ static CURLcode libcurl_generate_mime(CURL *curl,
 
 /* Wrapper to build and generate source code for a mime part. */
 static CURLcode libcurl_generate_mime_part(CURL *curl,
-                                      struct GlobalConfig *config,
-                                      tool_mime *part,
-                                      curl_mime *mime,
-                                      int mimeno)
+                                           struct GlobalConfig *config,
+                                           tool_mime *part,
+                                           curl_mime *mime,
+                                           int mimeno)
 {
   CURLcode ret = CURLE_OK;
   curl_mimepart *mimepart;
-  int submimeno;
+  int submimeno = 0;
   curl_mime *submime = NULL;
   char *escaped = NULL;
   const char *data = NULL;