From bc94978d8cbe0d3aa34ab6a4647fa784f973733a Mon Sep 17 00:00:00 2001 From: Paul Elliott Date: Thu, 3 Jun 2021 15:29:00 +0100 Subject: [PATCH] Add missing unused arguments No algorithm defined case generally doesn't use the operation. Signed-off-by: Paul Elliott --- library/psa_crypto_aead.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/library/psa_crypto_aead.c b/library/psa_crypto_aead.c index 1491b35973..3b8fdc8b6e 100644 --- a/library/psa_crypto_aead.c +++ b/library/psa_crypto_aead.c @@ -397,7 +397,7 @@ psa_status_t mbedtls_psa_aead_set_nonce( { psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; - #if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) +#if defined(MBEDTLS_PSA_BUILTIN_ALG_GCM) if( operation->alg == PSA_ALG_GCM ) { status = mbedtls_to_psa_error( @@ -427,6 +427,7 @@ psa_status_t mbedtls_psa_aead_set_nonce( else #endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */ { + ( void ) operation; ( void ) nonce; ( void ) nonce_length; @@ -474,6 +475,7 @@ psa_status_t mbedtls_psa_aead_set_lengths( else #endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */ { + ( void ) operation; ( void ) ad_length; ( void ) plaintext_length; @@ -510,8 +512,9 @@ psa_status_t mbedtls_psa_aead_update_ad( else #endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */ { - (void) input; - (void) input_length; + ( void ) operation; + ( void ) input; + ( void ) input_length; return ( PSA_ERROR_NOT_SUPPORTED ); } @@ -561,8 +564,8 @@ psa_status_t mbedtls_psa_aead_update( else #endif /* MBEDTLS_PSA_BUILTIN_ALG_CHACHA20_POLY1305 */ { - (void) input; - (void) input_length; + ( void ) input; + ( void ) input_length; return ( PSA_ERROR_NOT_SUPPORTED ); }