From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [RFC PATCH 10/14] monitor/hmp: Explicit we ignore a QEMUChrEvent in IOEventHandler
Date: Tue, 17 Dec 2019 17:37:22 +0000 [thread overview]
Message-ID: <20191217173722.GD2780@work-vm> (raw)
In-Reply-To: <20191217163808.20068-11-philmd@redhat.com>
* Philippe Mathieu-Daudé (philmd@redhat.com) wrote:
> The Chardev events are listed in the QEMUChrEvent enum. To be
> able to use this enum in the IOEventHandler typedef, we need to
> explicit when frontends ignore some events, to silent GCC the
> following warnings:
>
> CC monitor/hmp.o
> monitor/hmp.c: In function ‘monitor_event’:
> monitor/hmp.c:1330:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch]
> 1330 | switch (event) {
> | ^~~~~~
> cc1: all warnings being treated as errors
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
for HMP
Note that the use of 'default' will make life more unpredictable
if you ever come to add a new event type.
Dave
> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
> ---
> monitor/hmp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/monitor/hmp.c b/monitor/hmp.c
> index 8942e28933..d84238c120 100644
> --- a/monitor/hmp.c
> +++ b/monitor/hmp.c
> @@ -1371,6 +1371,10 @@ static void monitor_event(void *opaque, int event)
> mon_refcount--;
> monitor_fdsets_cleanup();
> break;
> +
> + default:
> + /* Ignore */
> + break;
> }
> }
>
> --
> 2.21.0
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2019-12-17 17:39 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-17 16:37 [PATCH 00/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Philippe Mathieu-Daudé
2019-12-17 16:37 ` Philippe Mathieu-Daudé
2019-12-17 16:37 ` [PATCH 01/14] hw/ipmi: Remove unnecessary declarations Philippe Mathieu-Daudé
2019-12-17 16:37 ` Philippe Mathieu-Daudé
2019-12-17 16:37 ` [RFC PATCH 02/14] chardev/char: Explicit we ignore some QEMUChrEvent in IOEventHandler Philippe Mathieu-Daudé
2019-12-17 16:37 ` Philippe Mathieu-Daudé
2019-12-17 16:37 ` [RFC PATCH 03/14] vhost-user: " Philippe Mathieu-Daudé
2019-12-17 16:37 ` Philippe Mathieu-Daudé
2019-12-17 16:37 ` [RFC PATCH 04/14] virtio-console: " Philippe Mathieu-Daudé
2019-12-17 16:37 ` Philippe Mathieu-Daudé
2019-12-17 16:37 ` [RFC PATCH 05/14] hw/ipmi: " Philippe Mathieu-Daudé
2019-12-17 16:37 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 06/14] hw/usb/dev-serial: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 07/14] ccid-card-passthru: Explicit we ignore " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 08/14] hw/usb/redirect: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 09/14] monitor/qmp: " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 10/14] monitor/hmp: Explicit we ignore a " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 17:37 ` Dr. David Alan Gilbert [this message]
2019-12-17 17:46 ` Philippe Mathieu-Daudé
2019-12-17 17:51 ` Dr. David Alan Gilbert
2019-12-17 16:38 ` [RFC PATCH 11/14] net/vhost-user: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 12/14] vhost-user-blk: " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [RFC PATCH 13/14] hw/char/terminal3270: Explicit ignored " Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-19 6:52 ` Markus Armbruster
2019-12-19 6:52 ` Markus Armbruster
2019-12-19 13:09 ` Philippe Mathieu-Daudé
2019-12-19 13:09 ` Philippe Mathieu-Daudé
2019-12-17 16:38 ` [PATCH 14/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Philippe Mathieu-Daudé
2019-12-17 16:38 ` Philippe Mathieu-Daudé
2019-12-17 16:50 ` [PATCH 00/14] " Philippe Mathieu-Daudé
2019-12-17 16:50 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191217173722.GD2780@work-vm \
--to=dgilbert@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.