]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
openssl: work around MSVC warning
authorMarcel Raad <MarcelRaad@users.noreply.github.com>
Thu, 16 Jul 2015 07:09:02 +0000 (09:09 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 23 Jul 2015 22:12:31 +0000 (00:12 +0200)
MSVC 12 complains:

lib\vtls\openssl.c(1554): warning C4701: potentially uninitialized local
variable 'verstr' used It's a false positive, but as it's normally not,
I have enabled warning-as-error for that warning.

lib/vtls/openssl.c

index beebdc1b72f8d6c75b6f7cfef94e01f5f1f191f4..90e4c2b32a3cc551775a380ccdfe7f3cb74e21ad 100644 (file)
@@ -1492,7 +1492,7 @@ static void ssl_tls_trace(int direction, int ssl_ver, int content_type,
   char ssl_buf[1024];
   char unknown[32];
   int msg_type, txt_len;
-  const char *verstr;
+  const char *verstr = NULL;
   struct connectdata *conn = userp;
 
   if(!conn || !conn->data || !conn->data->set.fdebug ||