From 4c49927bad54a255507872701815968453741dfc Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Tue, 27 Sep 2022 13:55:37 +0200 Subject: [PATCH] Fix unused variables warnings in default + stream cipher only build Signed-off-by: Przemek Stekiel --- library/psa_crypto.c | 1 + library/ssl_msg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index 4a0bd8331..e45b5d70a 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -3592,6 +3592,7 @@ static psa_status_t psa_aead_check_nonce_length( psa_algorithm_t alg, break; #endif /* PSA_WANT_ALG_CHACHA20_POLY1305 */ default: + (void) nonce_length; return( PSA_ERROR_NOT_SUPPORTED ); } diff --git a/library/ssl_msg.c b/library/ssl_msg.c index dbef29b3f..06194bd2d 100644 --- a/library/ssl_msg.c +++ b/library/ssl_msg.c @@ -1124,7 +1124,9 @@ int mbedtls_ssl_decrypt_buf( mbedtls_ssl_context const *ssl, mbedtls_ssl_transform *transform, mbedtls_record *rec ) { +#if defined(MBEDTLS_SSL_SOME_SUITES_USE_CBC) || defined(MBEDTLS_CIPHER_MODE_AEAD) size_t olen; +#endif /* MBEDTLS_SSL_SOME_SUITES_USE_CBC || MBEDTLS_CIPHER_MODE_AEAD */ mbedtls_ssl_mode_t ssl_mode; int ret;