From 18dc032fb4507d60b9460e087e77e056bd3ced93 Mon Sep 17 00:00:00 2001 From: David Horstmann Date: Wed, 20 Dec 2023 16:16:43 +0000 Subject: [PATCH] Prevent unused warnings in psa_aead_set_nonce() Signed-off-by: David Horstmann --- library/psa_crypto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/psa_crypto.c b/library/psa_crypto.c index e44a0c2766..25a375ac9a 100644 --- a/library/psa_crypto.c +++ b/library/psa_crypto.c @@ -4984,7 +4984,10 @@ psa_status_t psa_aead_set_nonce(psa_aead_operation_t *operation, status = psa_aead_set_nonce_internal(operation, nonce, nonce_length); +/* Exit label is only needed for buffer copying, prevent unused warnings. */ +#if defined(MBEDTLS_PSA_COPY_CALLER_BUFFERS) exit: +#endif LOCAL_INPUT_FREE(nonce_external, nonce);