From 734c65ad23ef748645a6f5ecefcad7c22e85d388 Mon Sep 17 00:00:00 2001 From: Jennifer Williams Date: Wed, 10 Mar 2021 03:51:50 +0200 Subject: [PATCH] arch: arm: core: aarch32: cortex_m: fault: fix if...else ifs bus_fault() and hard_fault() were missing final else statement in the if else if constructs. This commit adds non-empty else {} to comply with coding guideline 15.7. Signed-off-by: Jennifer Williams --- arch/arm/core/aarch32/cortex_m/fault.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/core/aarch32/cortex_m/fault.c b/arch/arm/core/aarch32/cortex_m/fault.c index fc52d93ba4d..2fe0310bd38 100644 --- a/arch/arm/core/aarch32/cortex_m/fault.c +++ b/arch/arm/core/aarch32/cortex_m/fault.c @@ -397,6 +397,8 @@ static int bus_fault(z_arch_esf_t *esf, int from_hard_fault, bool *recoverable) #else } else if (SCB->CFSR & SCB_CFSR_LSPERR_Msk) { PR_FAULT_INFO(" Floating-point lazy state preservation error"); + } else { + ; } #endif /* !defined(CONFIG_ARMV7_M_ARMV8_M_FP) */ @@ -687,7 +689,11 @@ static uint32_t hard_fault(z_arch_esf_t *esf, bool *recoverable) } else if (SAU->SFSR != 0) { secure_fault(esf); #endif /* CONFIG_ARM_SECURE_FIRMWARE */ + } else { + ; } + } else { + ; } #else #error Unknown ARM architecture