Skip to contentSkip to conversation

hw/arm/highbank: Silence warnings about missing fallthrough statements

PATCH Applied Thomas Huth 2 participants 2 messages Oct 20, 2020 – Oct 26, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/arm/highbank: Silence warnings about missing fallthrough statements

When compiling with -Werror=implicit-fallthrough, gcc complains about missing fallthrough annotations in this file. Looking at the code, the fallthrough is very likely intended here, so add some comments to silence the compiler warnings.

---
 hw/arm/highbank.c | 2 ++
 1 file changed, 2 insertions(+)
hw/arm/highbank.c +2 -0
index da0510d7ce..f71087860d 100644
@@ -92,10 +92,12 @@ static void hb_reset_secondary(ARMCPU *cpu, const struct arm_boot_info *info)
         address_space_stl_notdirty(&address_space_memory,
                                    SMP_BOOT_REG + 0x30, 0,
                                    MEMTXATTRS_UNSPECIFIED, NULL);
+        /* fallthrough */
     case 3:
         address_space_stl_notdirty(&address_space_memory,
                                    SMP_BOOT_REG + 0x20, 0,
                                    MEMTXATTRS_UNSPECIFIED, NULL);
+        /* fallthrough */
     case 2:
         address_space_stl_notdirty(&address_space_memory,
                                    SMP_BOOT_REG + 0x10, 0,
Signature · 1 line
2.18.2
#1 lore raw
Quoted 10 lines · Thomas Huth

When compiling with -Werror=implicit-fallthrough, gcc complains about missing fallthrough annotations in this file. Looking at the code, the fallthrough is very likely intended here, so add some comments to silence the compiler warnings.

---
 hw/arm/highbank.c | 2 ++
 1 file changed, 2 insertions(+)

Applied to target-arm.next, thanks.

-- PMM