diff mbox series

[RFC,v2,73/78] hw/watchdog/wdt_diag288.c: add fallthrough pseudo-keyword

Message ID c2d18ed386a50fafa9a29d86bbda06813281ca95.1697183699.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, 7:57 a.m. UTC
In preparation of raising -Wimplicit-fallthrough to 5, replace all
fall-through comments with the fallthrough attribute pseudo-keyword.

Signed-off-by: Emmanouil Pitsidianakis <manos.pitsidianakis@linaro.org>
---
 hw/watchdog/wdt_diag288.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
index 76d89fbf78..24fb7fcb62 100644
--- a/hw/watchdog/wdt_diag288.c
+++ b/hw/watchdog/wdt_diag288.c
@@ -66,28 +66,28 @@  static void diag288_timer_expired(void *dev)
 static int wdt_diag288_handle_timer(DIAG288State *diag288,
                                      uint64_t func, uint64_t timeout)
 {
     switch (func) {
     case WDT_DIAG288_INIT:
         diag288->enabled = true;
-        /* fall through */
+        fallthrough;
     case WDT_DIAG288_CHANGE:
         if (!diag288->enabled) {
             return -1;
         }
         timer_mod(diag288->timer,
                   qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) +
                   timeout * NANOSECONDS_PER_SECOND);
         break;
     case WDT_DIAG288_CANCEL:
         if (!diag288->enabled) {
             return -1;
         }
         diag288->enabled = false;
         timer_del(diag288->timer);
         break;
     default:
         return -1;
     }
 
     return 0;
 }