diff --git a/tests/api/test_certman.c b/tests/api/test_certman.c index 082da1ef6f1..86c5952b272 100644 --- a/tests/api/test_certman.c +++ b/tests/api/test_certman.c @@ -4158,7 +4158,6 @@ int test_wolfSSL_CRL_unknown_ext_cb_rescues_critical_entry_ext(void) crl_unk_ext_cb_accept32, &ctx), WOLFSSL_SUCCESS); break; - case CallbackTypeEnd: default: /* Not reachable: the loop bound excludes CallbackTypeEnd. */ ExpectFail(); @@ -4230,7 +4229,6 @@ int test_wolfSSL_CRL_unknown_ext_cb_rescues_critical_crl_ext(void) crl_unk_ext_cb_accept32, &ctx), WOLFSSL_SUCCESS); break; - case CallbackTypeEnd: default: /* Not reachable: the loop bound excludes CallbackTypeEnd. */ ExpectFail(); @@ -4272,7 +4270,6 @@ int test_wolfSSL_CRL_unknown_ext_cb_rescues_critical_crl_ext(void) crl_unk_ext_cb_reject32, &ctx), WOLFSSL_SUCCESS); break; - case CallbackTypeEnd: default: /* Not reachable: the loop bound excludes CallbackTypeEnd. */ ExpectFail(); @@ -4333,7 +4330,6 @@ int test_wolfSSL_CRL_unknown_ext_cb_positive_return_fails_load(void) crl_unk_ext_cb_reject_positive32, &ctx), WOLFSSL_SUCCESS); break; - case CallbackTypeEnd: default: /* Not reachable: the loop bound excludes CallbackTypeEnd. */ ExpectFail(); @@ -4410,7 +4406,6 @@ int test_wolfSSL_CRL_unknown_ext_cb_noctx(void) crl_unk_ext_cb_noctx_accept32), WOLFSSL_SUCCESS); break; - case CallbackTypeEnd: default: /* Not reachable: the loop bound excludes CallbackTypeEnd. */ ExpectFail(); @@ -4451,7 +4446,6 @@ int test_wolfSSL_CRL_unknown_ext_cb_noctx(void) crl_unk_ext_cb_noctx_reject32), WOLFSSL_SUCCESS); break; - case CallbackTypeEnd: default: /* Not reachable: the loop bound excludes CallbackTypeEnd. */ ExpectFail(); diff --git a/tests/api/test_hmac.c b/tests/api/test_hmac.c index 6b7e46a6f57..b8acb39984c 100644 --- a/tests/api/test_hmac.c +++ b/tests/api/test_hmac.c @@ -1163,6 +1163,7 @@ int test_wc_HmacId_CryptoCb(void) byte mac[WC_SHA256_DIGEST_SIZE]; XMEMSET(&seen, 0, sizeof(seen)); + XMEMSET(&hmac, 0, sizeof(hmac)); ExpectIntEQ(wc_CryptoCb_RegisterDevice(TEST_HMAC_CRYPTOCB_DEVID, test_hmac_id_cb, &seen), 0); diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index bdbb2748ba9..698b29e0f74 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -35267,9 +35267,7 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rng_drbg_rbgc_test(void) } #ifdef WC_RNG_HAVE_LOCK if (prim_inited) { - cleanup_ret = wc_FreeRng_PreLocked(&prim); - if ((cleanup_ret != 0) && (ret == 0)) - ret = WC_TEST_RET_ENC_EC(cleanup_ret); + (void)wc_FreeRng_PreLocked(&prim); } #endif if (extra_inited) { @@ -37390,7 +37388,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rng_lifecycle_test(void) } if (root_held) { int put_ret = wc_RNG_lock_put(root, 0); - root_held = 0; if ((api_ret == 0) && (put_ret != 0)) api_ret = WC_TEST_RET_ENC_EC(put_ret); } @@ -37424,10 +37421,6 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t rng_lifecycle_test(void) } } } - if (root_held) { - (void)wc_FreeRng_PreLocked(root); - (void)wc_RNG_lock_put(root, 0); - } if (bank_inited) { int fini_ret = wc_rng_bank_fini(bank); if ((api_ret == 0) && (fini_ret != 0))