SPM: Suppress Pe111 (statement is unreachable) for IAR

As redundant code is needed for FIH

Change-Id: I9fecf4d5b5ee80eb501a8d71a028b7223293ca40
Signed-off-by: Bohdan Hunko <Bohdan.Hunko@infineon.com>
diff --git a/secure_fw/partitions/idle_partition/idle_partition.c b/secure_fw/partitions/idle_partition/idle_partition.c
index 8f45f94..999a27a 100644
--- a/secure_fw/partitions/idle_partition/idle_partition.c
+++ b/secure_fw/partitions/idle_partition/idle_partition.c
@@ -27,6 +27,10 @@
     }
 
 #ifdef TFM_FIH_PROFILE_ON
+/* Suppress Pe111 (statement is unreachable) for IAR as redundant code is needed for FIH */
+#if defined(__ICCARM__)
+#pragma diag_suppress = Pe111
+#endif
     (void)fih_delay();
 
     while (1) {
@@ -40,5 +44,8 @@
             __WFI();
         }
     }
+#if defined(__ICCARM__)
+#pragma diag_default = Pe111
+#endif
 #endif
 }
diff --git a/secure_fw/spm/core/utilities.c b/secure_fw/spm/core/utilities.c
index b1f8f4c..9ab3c4e 100644
--- a/secure_fw/spm/core/utilities.c
+++ b/secure_fw/spm/core/utilities.c
@@ -26,6 +26,10 @@
     tfm_dump_backtrace(__func__, tfm_log);
 #endif
 
+/* Suppress Pe111 (statement is unreachable) for IAR as redundant code is needed for FIH */
+#if defined(__ICCARM__)
+#pragma diag_suppress = Pe111
+#endif
 #ifdef CONFIG_TFM_HALT_ON_CORE_PANIC
 
     /*
@@ -58,4 +62,7 @@
 #endif
 
 #endif /* CONFIG_TFM_HALT_ON_CORE_PANIC */
+#if defined(__ICCARM__)
+#pragma diag_default = Pe111
+#endif
 }