* [PATCH] tests/test-char: Use a proper fallthrough comment
@ 2020-10-02 17:13 Thomas Huth
2020-10-02 17:16 ` Marc-André Lureau
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Huth @ 2020-10-02 17:13 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, Marc-André Lureau
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>
---
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 d35cc839bc..9196e566e9 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.18.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/test-char: Use a proper fallthrough comment
2020-10-02 17:13 [PATCH] tests/test-char: Use a proper fallthrough comment Thomas Huth
@ 2020-10-02 17:16 ` Marc-André Lureau
2020-10-02 17:22 ` Philippe Mathieu-Daudé
2020-10-12 14:12 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Marc-André Lureau @ 2020-10-02 17:16 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu trival, QEMU
[-- Attachment #1: Type: text/plain, Size: 944 bytes --]
On Fri, Oct 2, 2020 at 9:14 PM Thomas Huth <thuth@redhat.com> wrote:
> 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>
---
> 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 d35cc839bc..9196e566e9 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.18.2
>
>
>
--
Marc-André Lureau
[-- Attachment #2: Type: text/html, Size: 1722 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/test-char: Use a proper fallthrough comment
2020-10-02 17:13 [PATCH] tests/test-char: Use a proper fallthrough comment Thomas Huth
2020-10-02 17:16 ` Marc-André Lureau
@ 2020-10-02 17:22 ` Philippe Mathieu-Daudé
2020-10-12 14:12 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-02 17:22 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: qemu-trivial, Marc-André Lureau
On 10/2/20 7:13 PM, Thomas Huth wrote:
> 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>
> ---
> 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 d35cc839bc..9196e566e9 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;
>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tests/test-char: Use a proper fallthrough comment
2020-10-02 17:13 [PATCH] tests/test-char: Use a proper fallthrough comment Thomas Huth
2020-10-02 17:16 ` Marc-André Lureau
2020-10-02 17:22 ` Philippe Mathieu-Daudé
@ 2020-10-12 14:12 ` Laurent Vivier
2 siblings, 0 replies; 4+ messages in thread
From: Laurent Vivier @ 2020-10-12 14:12 UTC (permalink / raw)
To: Thomas Huth, qemu-devel; +Cc: qemu-trivial, Marc-André Lureau
Le 02/10/2020 à 19:13, Thomas Huth a écrit :
> 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>
> ---
> 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 d35cc839bc..9196e566e9 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;
>
Applied to my trivial-patches branch.
Thanks,
Laurent
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-10-12 14:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-02 17:13 [PATCH] tests/test-char: Use a proper fallthrough comment Thomas Huth
2020-10-02 17:16 ` Marc-André Lureau
2020-10-02 17:22 ` Philippe Mathieu-Daudé
2020-10-12 14:12 ` Laurent Vivier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).