From 96b9d674eba98db989392b78f23a4ac9d69e23f3 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Wed, 11 Mar 2026 19:33:17 +0100 Subject: [PATCH] Switch off overeager IAR warning Signed-off-by: Gilles Peskine --- tests/src/psa_exercise_key.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/src/psa_exercise_key.c b/tests/src/psa_exercise_key.c index c657160d3..ffed3becf 100644 --- a/tests/src/psa_exercise_key.c +++ b/tests/src/psa_exercise_key.c @@ -38,6 +38,15 @@ #include #endif +#if defined(__IAR_SYSTEMS_ICC__) +/* Suppress a very overeager warning from IAR: it dislikes a forward goto + * that bypasses the initialization of a variable, even if that variable + * is not used after the jump. (This is perfectly valid C; it would only + * be invalid C if jumping into a block from outside that block.) + */ +#pragma diag_suppress=Pe546 // transfer of control bypasses initialization +#endif + #if defined(MBEDTLS_PSA_CRYPTO_SE_C) static int lifetime_is_dynamic_secure_element(psa_key_lifetime_t lifetime) {