diff mbox series

[RFC,v2,77/78] tests/unit/test-char.c: add fallthrough pseudo-keyword

Message ID 92c0d221dab341363cf85f8e7526e32cfc048ff0.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>
---
 tests/unit/test-char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/unit/test-char.c b/tests/unit/test-char.c
index 649fdf64e1..6f5a2c4108 100644
--- a/tests/unit/test-char.c
+++ b/tests/unit/test-char.c
@@ -56,25 +56,25 @@  static void fe_read(void *opaque, const uint8_t *buf, int size)
 static void fe_event(void *opaque, QEMUChrEvent event)
 {
     FeHandler *h = opaque;
     bool new_open_state;
 
     h->last_event = event;
     switch (event) {
     case CHR_EVENT_BREAK:
         break;
     case CHR_EVENT_OPENED:
     case CHR_EVENT_CLOSED:
         h->openclose_count++;
         new_open_state = (event == CHR_EVENT_OPENED);
         if (h->is_open == new_open_state) {
             h->openclose_mismatch = true;
         }
         h->is_open = new_open_state;
-        /* fallthrough */
+        fallthrough;
     default:
         quit = true;
         break;
     }
 }
 
 #ifdef _WIN32