]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
gtls: fix uninitialized variable
authorViktor Szakats <commit@vsz.me>
Sat, 8 Mar 2025 03:25:03 +0000 (04:25 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 8 Mar 2025 12:24:24 +0000 (13:24 +0100)
Fix uninitialized variable (warning by MSVC):
```
lib\vtls\gtls.c(1207,1): error C2220: the following warning is treated as an error
lib\vtls\gtls.c(1207,1): warning C4701: potentially uninitialized local variable 'result' used
```
Ref: https://github.com/curl/curl/actions/runs/13733139148/job/38413553053#step:9:31

Closes #16625

lib/vtls/gtls.c

index d078c4b9183396ffb4f0abd909aff08e57a164e0..a9000f48444bf301e5eb4d29f6e5f374c0820399 100644 (file)
@@ -1113,7 +1113,7 @@ CURLcode Curl_gtls_ctx_init(struct gtls_ctx *gctx,
   size_t gtls_alpns_count = 0;
   bool gtls_session_setup = FALSE;
   struct alpn_spec alpns;
-  CURLcode result;
+  CURLcode result = CURLE_OK;
   int rc;
 
   DEBUGASSERT(gctx);