[PULL 05/15] tests/test-char: Use a proper fallthrough comment

Laurent Vivier posted 15 patches 5 years, 3 months ago
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Anup Patel <anup.patel@wdc.com>, Andrzej Zaborowski <balrogg@gmail.com>, Alistair Francis <Alistair.Francis@wdc.com>
There is a newer version of this series
[PULL 05/15] tests/test-char: Use a proper fallthrough comment
Posted by Laurent Vivier 5 years, 3 months ago
From: Thomas Huth <thuth@redhat.com>

For being able to compile with -Werror=implicit-fallthrough we need
to use comments that the compiler recognizes. Use "fallthrough" instead
of "no break" here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20201002171343.283426-1-thuth@redhat.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 tests/test-char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test-char.c b/tests/test-char.c
index d35cc839bc60..9196e566e9ba 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -70,7 +70,7 @@ static void fe_event(void *opaque, QEMUChrEvent event)
             h->openclose_mismatch = true;
         }
         h->is_open = new_open_state;
-        /* no break */
+        /* fallthrough */
     default:
         quit = true;
         break;
-- 
2.26.2