Skip to content

Commit 96b9d67

Browse files
Switch off overeager IAR warning
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent 4ad123d commit 96b9d67

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/src/psa_exercise_key.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@
3838
#include <rsa_internal.h>
3939
#endif
4040

41+
#if defined(__IAR_SYSTEMS_ICC__)
42+
/* Suppress a very overeager warning from IAR: it dislikes a forward goto
43+
* that bypasses the initialization of a variable, even if that variable
44+
* is not used after the jump. (This is perfectly valid C; it would only
45+
* be invalid C if jumping into a block from outside that block.)
46+
*/
47+
#pragma diag_suppress=Pe546 // transfer of control bypasses initialization
48+
#endif
49+
4150
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
4251
static int lifetime_is_dynamic_secure_element(psa_key_lifetime_t lifetime)
4352
{

0 commit comments

Comments
 (0)