Prevent unused warnings in psa_aead_set_nonce()

Signed-off-by: David Horstmann <david.horstmann@arm.com>
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index e44a0c2..25a375a 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -4984,7 +4984,10 @@
 
     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);