Avoid bogus warning on uninitialized variables on old versions of GCC

gcc-4.3.3 erroneously complains that some variables may be used
uninitialized. Silence it assigning NULL on declaration, as is already
done with many other variables.
This commit is contained in:
Albert Ribes
2025-07-21 10:57:50 +02:00
parent decea12e22
commit b2463f167c
2 changed files with 3 additions and 3 deletions

View File

@@ -3855,7 +3855,7 @@ WOLFSSL_ABI
int wolfSSL_UseALPN(WOLFSSL* ssl, char *protocol_name_list,
word32 protocol_name_listSz, byte options)
{
char *list, *ptr, **token;
char *list, *ptr = NULL, **token;
word16 len;
int idx = 0;
int ret = WC_NO_ERR_TRACE(WOLFSSL_FAILURE);

View File

@@ -47339,7 +47339,7 @@ static int test_sk_X509_CRL(void)
#endif
WOLFSSL_X509_REVOKED revoked;
WOLFSSL_ASN1_INTEGER* asnInt = NULL;
const WOLFSSL_ASN1_INTEGER* sn;
const WOLFSSL_ASN1_INTEGER* sn = NULL;
#if (!defined(NO_FILESYSTEM) && !defined(NO_STDIO_FILESYSTEM)) || \
!defined(NO_BIO)
@@ -56468,7 +56468,7 @@ static int test_wolfSSL_EC_KEY_private_key(void)
WOLFSSL_EC_KEY* key = NULL;
WOLFSSL_BIGNUM* priv = NULL;
WOLFSSL_BIGNUM* priv2 = NULL;
WOLFSSL_BIGNUM* bn;
WOLFSSL_BIGNUM* bn = NULL;
ExpectNotNull(key = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1));
ExpectNotNull(priv = wolfSSL_BN_new());