Fix uninitialized variable compiler warning

This commit is contained in:
Lealem Amedie
2023-04-28 13:58:29 -06:00
parent 52a20fc2b5
commit 99b4ee50ba
2 changed files with 3 additions and 3 deletions

View File

@ -10461,7 +10461,7 @@ static int GetDtlsRecordHeader(WOLFSSL* ssl, word32* inOutIdx,
static int GetRecordHeader(WOLFSSL* ssl, word32* inOutIdx, static int GetRecordHeader(WOLFSSL* ssl, word32* inOutIdx,
RecordLayerHeader* rh, word16 *size) RecordLayerHeader* rh, word16 *size)
{ {
byte tls12minor; byte tls12minor = 0;
#ifdef OPENSSL_ALL #ifdef OPENSSL_ALL
word32 start = *inOutIdx; word32 start = *inOutIdx;

View File

@ -7394,7 +7394,7 @@ int ProcessBuffer(WOLFSSL_CTX* ctx, const unsigned char* buff,
ret = ProcessUserChain(ctx, buff, sz, format, type, ssl, used, info, ret = ProcessUserChain(ctx, buff, sz, format, type, ssl, used, info,
verify); verify);
if (ret == ASN_NO_PEM_HEADER) { /* Additional chain is optional */ if (ret == ASN_NO_PEM_HEADER) { /* Additional chain is optional */
unsigned long pemErr; unsigned long pemErr = 0;
CLEAR_ASN_NO_PEM_HEADER_ERROR(pemErr); CLEAR_ASN_NO_PEM_HEADER_ERROR(pemErr);
ret = 0; ret = 0;
} }
@ -8938,7 +8938,7 @@ int wolfSSL_CTX_load_verify_locations_ex(WOLFSSL_CTX* ctx, const char* file,
(ret == ASN_NO_PEM_HEADER))) { (ret == ASN_NO_PEM_HEADER))) {
/* Do not fail here if a certificate fails to load, /* Do not fail here if a certificate fails to load,
continue to next file */ continue to next file */
unsigned long err; unsigned long err = 0;
CLEAR_ASN_NO_PEM_HEADER_ERROR(err); CLEAR_ASN_NO_PEM_HEADER_ERROR(err);
#if defined(WOLFSSL_QT) #if defined(WOLFSSL_QT)
ret = WOLFSSL_SUCCESS; ret = WOLFSSL_SUCCESS;