@@ -4705,7 +4705,7 @@ static int test_wolfSSL_EVP_PKEY_print_public(void)
47054705 WOLFSSL_EVP_PKEY* pkey = NULL;
47064706 char line[256] = { 0 };
47074707 char line1[256] = { 0 };
4708- int i;
4708+ int i = 0 ;
47094709
47104710 /* test error cases */
47114711 ExpectIntEQ( EVP_PKEY_print_public(NULL,NULL,0,NULL),0L);
@@ -25739,7 +25739,7 @@ static int test_ToTraditional(void)
2573925739 defined(OPENSSL_EXTRA_X509_SMALL)) && !defined(NO_FILESYSTEM)
2574025740 XFILE f = XBADFILE;
2574125741 byte input[TWOK_BUF];
25742- word32 sz;
25742+ word32 sz = 0 ;
2574325743
2574425744 ExpectTrue((f = XFOPEN("./certs/server-keyPkcs8.der", "rb")) != XBADFILE);
2574525745 ExpectTrue((sz = (word32)XFREAD(input, 1, sizeof(input), f)) > 0);
@@ -28151,10 +28151,10 @@ static int test_wc_PKCS7_EncodeEncryptedData(void)
2815128151 byte decoded[TWOK_BUF];
2815228152 word32 tmpWrd32 = 0;
2815328153 int tmpInt = 0;
28154- int decodedSz;
28154+ int decodedSz = 0 ;
2815528155 int encryptedSz = 0;
28156- int testSz;
28157- int i;
28156+ int testSz = 0 ;
28157+ int i = 0 ;
2815828158 const byte data[] = { /* Hello World */
2815928159 0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,
2816028160 0x72,0x6c,0x64
@@ -28766,7 +28766,7 @@ static int test_wc_PKCS7_signed_enveloped(void)
2876628766 word32 idx = 0;
2876728767 byte digest[MAX_SEQ_SZ + MAX_ALGO_SZ + MAX_OCTET_STR_SZ +
2876828768 WC_MAX_DIGEST_SIZE];
28769- int digestSz;
28769+ int digestSz = 0 ;
2877028770
2877128771 ExpectIntEQ(wc_InitRsaKey(&rKey, HEAP_HINT), 0);
2877228772 ExpectIntEQ(wc_RsaPrivateKeyDecode(key, &idx, &rKey, keySz), 0);
@@ -29680,7 +29680,7 @@ static int test_wolfSSL_d2i_ASN1_INTEGER(void)
2968029680 const byte* p = NULL;
2968129681 byte* p2 = NULL;
2968229682 byte* reEncoded = NULL;
29683- int reEncodedSz;
29683+ int reEncodedSz = 0 ;
2968429684
2968529685 static const byte zeroDer[] = {
2968629686 0x02, 0x01, 0x00
@@ -31026,8 +31026,8 @@ static int test_wolfSSL_ASN1_TIME_diff_compare(void)
3102631026 ASN1_TIME* closeToTime = NULL;
3102731027 ASN1_TIME* toTime = NULL;
3102831028 ASN1_TIME* invalidTime = NULL;
31029- int daysDiff;
31030- int secsDiff;
31029+ int daysDiff = 0 ;
31030+ int secsDiff = 0 ;
3103131031
3103231032 ExpectNotNull((fromTime = ASN1_TIME_new()));
3103331033 /* Feb 22, 2003, 21:15:15 */
@@ -31219,6 +31219,8 @@ static int test_wolfSSL_ASN1_TIME_to_tm(void)
3121931219 struct tm tm;
3122031220 time_t testTime = 1683926567; /* Fri May 12 09:22:47 PM UTC 2023 */
3122131221
31222+ XMEMSET(&tm, 0, sizeof(struct tm));
31223+
3122231224 XMEMSET(&asnTime, 0, sizeof(ASN1_TIME));
3122331225 ExpectIntEQ(ASN1_TIME_set_string(&asnTime, "000222211515Z"), 1);
3122431226 ExpectIntEQ(ASN1_TIME_to_tm(&asnTime, NULL), 1);
@@ -31626,7 +31628,7 @@ static int test_wolfSSL_IMPLEMENT_ASN1_FUNCTIONS(void)
3162631628#if !defined(HAVE_FIPS) || (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION>2))
3162731629 EC_KEY *eckey = NULL;
3162831630 EVP_PKEY *key = NULL;
31629- size_t len;
31631+ size_t len = 0 ;
3163031632 unsigned char *der = NULL;
3163131633 DPP_BOOTSTRAPPING_KEY *bootstrap = NULL;
3163231634 const unsigned char *in = ecc_clikey_der_256;
@@ -31950,7 +31952,7 @@ static int test_wolfSSL_X509_NAME_print_ex(void)
3195031952 defined(HAVE_LIGHTY) || defined(WOLFSSL_HAPROXY) || \
3195131953 defined(WOLFSSL_OPENSSH) || defined(HAVE_SBLIM_SFCB)))) && \
3195231954 !defined(NO_BIO) && !defined(NO_RSA)
31953- int memSz;
31955+ int memSz = 0 ;
3195431956 byte* mem = NULL;
3195531957 BIO* bio = NULL;
3195631958 BIO* membio = NULL;
@@ -32113,7 +32115,7 @@ static int test_wolfSSL_X509_INFO_multiple_info(void)
3211332115 * to group objects together. */
3211432116 ExpectNotNull(concatBIO = BIO_new(BIO_s_mem()));
3211532117 for (curFile = files; EXPECT_SUCCESS() && *curFile != NULL; curFile++) {
32116- int fileLen;
32118+ int fileLen = 0 ;
3211732119 ExpectNotNull(fileBIO = BIO_new_file(*curFile, "rb"));
3211832120 ExpectIntGT(fileLen = wolfSSL_BIO_get_len(fileBIO), 0);
3211932121 if (EXPECT_SUCCESS()) {
@@ -32459,7 +32461,7 @@ static int test_wc_KeyPemToDer(void)
3245932461{
3246032462 EXPECT_DECLS;
3246132463#if defined(WOLFSSL_PEM_TO_DER) && !defined(NO_FILESYSTEM) && !defined(NO_RSA)
32462- int ret;
32464+ int ret = 0 ;
3246332465 const byte cert_buf[] = \
3246432466 "-----BEGIN PRIVATE KEY-----\n"
3246532467 "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDMG5KgWxP002pA\n"
@@ -32830,7 +32832,7 @@ static int test_wolfSSL_certs(void)
3283032832 ASN1_STRING* asn1_str = NULL;
3283132833 AUTHORITY_KEYID* akey = NULL;
3283232834 BASIC_CONSTRAINTS* bc = NULL;
32833- int crit;
32835+ int crit = 0 ;
3283432836
3283532837#ifndef NO_WOLFSSL_SERVER
3283632838 ExpectNotNull(ctx = SSL_CTX_new(SSLv23_server_method()));
@@ -33342,7 +33344,7 @@ static int test_wolfSSL_PEM_read_PrivateKey(void)
3334233344 RSA* rsa = NULL;
3334333345 WOLFSSL_EVP_PKEY_CTX* ctx = NULL;
3334433346 unsigned char* sig = NULL;
33345- size_t sigLen;
33347+ size_t sigLen = 0 ;
3334633348 const unsigned char tbs[] = {0, 1, 2, 3, 4, 5, 6, 7};
3334733349 size_t tbsLen = sizeof(tbs);
3334833350
@@ -33417,7 +33419,7 @@ static int test_wolfSSL_PEM_PrivateKey(void)
3341733419 const char* fname = "./certs/server-key.pem";
3341833420 const char* fname_rsa_p8 = "./certs/server-keyPkcs8.pem";
3341933421
33420- size_t sz;
33422+ size_t sz = 0 ;
3342133423 byte* buf = NULL;
3342233424 EVP_PKEY* pkey2 = NULL;
3342333425 EVP_PKEY* pkey3 = NULL;
@@ -62375,7 +62377,7 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
6237562377 char msg[] = "I hear you fa shizzle!";
6237662378 int len = (int) XSTRLEN(msg);
6237762379 char input[1024];
62378- int ret;
62380+ int ret = 0 ;
6237962381 int err = 0;
6238062382
6238162383 if (!args)
0 commit comments