]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
bearssl: fix compiler warnings
authorGisle Vanem <gisle.vanem@gmail.com>
Fri, 5 Apr 2024 12:14:29 +0000 (14:14 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 5 Apr 2024 14:15:27 +0000 (16:15 +0200)
"variables may be uninitialized when used"

Fixes #13290
Closes #13297

lib/vtls/bearssl.c

index 16f9c4e92767ba6bd1a1cba197c402e1bee1bd95..9b003d695820a21d058f39b699f6458ff6c64c26 100644 (file)
@@ -120,9 +120,9 @@ static CURLcode load_cafile(struct cafile_source *source,
   br_x509_pkey *pkey;
   FILE *fp = 0;
   unsigned char buf[BUFSIZ];
-  const unsigned char *p;
+  const unsigned char *p = NULL;
   const char *name;
-  size_t n, i, pushed;
+  size_t n = 0, i, pushed;
 
   DEBUGASSERT(source->type == CAFILE_SOURCE_PATH
               || source->type == CAFILE_SOURCE_BLOB);