Skip to content

Commit 99b4ee5

Browse files
author
Lealem Amedie
committed
Fix uninitialized variable compiler warning
1 parent 52a20fc commit 99b4ee5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/internal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10461,7 +10461,7 @@ static int GetDtlsRecordHeader(WOLFSSL* ssl, word32* inOutIdx,
1046110461
static int GetRecordHeader(WOLFSSL* ssl, word32* inOutIdx,
1046210462
RecordLayerHeader* rh, word16 *size)
1046310463
{
10464-
byte tls12minor;
10464+
byte tls12minor = 0;
1046510465

1046610466
#ifdef OPENSSL_ALL
1046710467
word32 start = *inOutIdx;

src/ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7394,7 +7394,7 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
73947394
ret = ProcessUserChain(ctx, buff, sz, format, type, ssl, used, info,
73957395
verify);
73967396
if (ret == ASN_NO_PEM_HEADER) { /* Additional chain is optional */
7397-
unsigned long pemErr;
7397+
unsigned long pemErr = 0;
73987398
CLEAR_ASN_NO_PEM_HEADER_ERROR(pemErr);
73997399
ret = 0;
74007400
}
@@ -8938,7 +8938,7 @@ int wolfSSL_CTX_load_verify_locations_ex(WOLFSSL_CTX* ctx, const char* file,
89388938
(ret == ASN_NO_PEM_HEADER))) {
89398939
/* Do not fail here if a certificate fails to load,
89408940
continue to next file */
8941-
unsigned long err;
8941+
unsigned long err = 0;
89428942
CLEAR_ASN_NO_PEM_HEADER_ERROR(err);
89438943
#if defined(WOLFSSL_QT)
89448944
ret = WOLFSSL_SUCCESS;

0 commit comments

Comments
 (0)