diff mbox series

[RFC,v3,58/78] hw/ppc: add fallthrough pseudo-keyword

Message ID 226ded7066ffc9e279a75b34e45f573e50f1418c.1697186560.git.manos.pitsidianakis@linaro.org (mailing list archive)
State New, archived
Headers show
Series Strict disable implicit fallthrough | expand

Commit Message

Manos Pitsidianakis Oct. 13, 2023, 8:46 a.m. UTC
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/ppc/pnv_bmc.c      | 2 +-
 hw/ppc/spapr_events.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/ppc/pnv_bmc.c b/hw/ppc/pnv_bmc.c
index 99f1e8d7f9..9bff7d03cb 100644
--- a/hw/ppc/pnv_bmc.c
+++ b/hw/ppc/pnv_bmc.c
@@ -210,7 +210,7 @@  static void hiomap_cmd(IPMIBmcSim *ibs, uint8_t *cmd, unsigned int cmd_len,
 
     case HIOMAP_C_CREATE_READ_WINDOW:
         readonly = true;
-        /* Fall through */
+        fallthrough;
 
     case HIOMAP_C_CREATE_WRITE_WINDOW:
         memory_region_set_readonly(&pnor->mmio, readonly);
diff --git a/hw/ppc/spapr_events.c b/hw/ppc/spapr_events.c
index 4508e40814..9d51746daf 100644
--- a/hw/ppc/spapr_events.c
+++ b/hw/ppc/spapr_events.c
@@ -423,6 +423,7 @@  rtas_event_log_to_source(SpaprMachineState *spapr, int log_type)
             break;
         }
         /* fall through back to epow for legacy hotplug interrupt source */
+        fallthrough;
     case RTAS_LOG_TYPE_EPOW:
         source = spapr_event_sources_get_source(spapr->event_sources,
                                                 EVENT_CLASS_EPOW);