From f7d3ce7843f20d83073d0ae20a518fb48f8d3fa4 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Thu, 30 Mar 2023 11:44:08 -0600 Subject: [PATCH] resolve warning about uninitialized variable --- wolfcrypt/src/port/caam/wolfcaam_fsl_nxp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wolfcrypt/src/port/caam/wolfcaam_fsl_nxp.c b/wolfcrypt/src/port/caam/wolfcaam_fsl_nxp.c index d2362a4f2e..ae02692c0b 100644 --- a/wolfcrypt/src/port/caam/wolfcaam_fsl_nxp.c +++ b/wolfcrypt/src/port/caam/wolfcaam_fsl_nxp.c @@ -405,7 +405,7 @@ int wc_CAAM_EccSign(const byte* in, int inlen, byte* out, word32* outlen, word32 sSz = MAX_ECC_BYTES; int keySz; word32 ecdsel; - word32 enc; + word32 enc = 0; status_t status; caam_handle_t hndl; @@ -464,6 +464,9 @@ int wc_CAAM_EccSign(const byte* in, int inlen, byte* out, word32* outlen, case CAAM_BLACK_KEY_ECB: enc = CAAM_PKHA_ENC_PRI_AESECB; break; + default: + WOLFSSL_MSG("unknown/unsupported key type"); + return BAD_FUNC_ARG; } if ((wc_ptr_t)in % CAAM_BUFFER_ALIGN) {