From: Cornelia Huck <cohuck@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: qemu-devel@nongnu.org, "Halil Pasic" <pasic@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [RFC PATCH v2 03/14] hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler
Date: Thu, 19 Dec 2019 13:11:49 +0100 [thread overview]
Message-ID: <20191219131149.5973d2ba.cohuck@redhat.com> (raw)
In-Reply-To: <20191218172009.8868-4-philmd@redhat.com>
On Wed, 18 Dec 2019 18:19:58 +0100
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 all the events ignored by this frontend, to silent the
> following GCC warning:
>
> CC s390x-softmmu/hw/char/terminal3270.o
> hw/char/terminal3270.c: In function ‘chr_event’:
> hw/char/terminal3270.c:156:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch]
> 156 | switch (event) {
> | ^~~~~~
> hw/char/terminal3270.c:156:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch]
> hw/char/terminal3270.c:156:5: error: enumeration value ‘CHR_EVENT_MUX_OUT’ not handled in switch [-Werror=switch]
> cc1: all warnings being treated as errors
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: Add all missing enums
>
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Halil Pasic <pasic@linux.ibm.com>
> Cc: Christian Borntraeger <borntraeger@de.ibm.com>
> Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: qemu-s390x@nongnu.org
> ---
> hw/char/terminal3270.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/char/terminal3270.c b/hw/char/terminal3270.c
> index 6859c1bcb2..2aab04fd4b 100644
> --- a/hw/char/terminal3270.c
> +++ b/hw/char/terminal3270.c
> @@ -166,6 +166,11 @@ static void chr_event(void *opaque, int event)
> sch->curr_status.scsw.dstat = SCSW_DSTAT_DEVICE_END;
> css_conditional_io_interrupt(sch);
> break;
> + case CHR_EVENT_BREAK:
> + case CHR_EVENT_MUX_IN:
> + case CHR_EVENT_MUX_OUT:
> + /* Ignore */
> + break;
> }
> }
>
It indeed seems sane to ignore all of these.
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
next prev parent reply other threads:[~2019-12-19 12:12 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 17:19 [PATCH v2 00/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Philippe Mathieu-Daudé
2019-12-18 17:19 ` [PATCH v2 01/14] hw/ipmi: Remove unnecessary declarations Philippe Mathieu-Daudé
2019-12-18 17:19 ` [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler Philippe Mathieu-Daudé
2019-12-18 18:41 ` Corey Minyard
2019-12-18 20:47 ` Richard Henderson
2019-12-18 22:45 ` Philippe Mathieu-Daudé
2019-12-18 17:19 ` [RFC PATCH v2 03/14] hw/char/terminal3270: Explicit ignored " Philippe Mathieu-Daudé
2019-12-19 12:11 ` Cornelia Huck [this message]
2019-12-18 17:19 ` [RFC PATCH v2 04/14] hw/usb/dev-serial: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 05/14] hw/usb/redirect: " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 06/14] ccid-card-passthru: Explicit we ignore " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 07/14] vhost-user-crypto: Explicit we ignore some " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 08/14] vhost-user-net: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-19 12:21 ` Michael S. Tsirkin
2019-12-18 17:20 ` [RFC PATCH v2 09/14] vhost-user-blk: " Philippe Mathieu-Daudé
2019-12-19 12:22 ` Michael S. Tsirkin
2019-12-18 17:20 ` [RFC PATCH v2 10/14] virtio-console: Explicit we ignore some " Philippe Mathieu-Daudé
2019-12-19 12:22 ` Michael S. Tsirkin
2019-12-18 17:20 ` [RFC PATCH v2 11/14] monitor/qmp: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-19 17:00 ` Markus Armbruster
2019-12-18 17:20 ` [PATCH v2 12/14] monitor/hmp: Explicit we ignore a " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 13/14] chardev/char: Explicit we ignore some " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 14/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef Philippe Mathieu-Daudé
2019-12-18 18:42 ` Corey Minyard
2019-12-18 20:44 ` Richard Henderson
2019-12-19 12:15 ` Cornelia Huck
2019-12-20 13:32 ` [PATCH v2 00/14] " Marc-André Lureau
2020-01-07 15:23 ` Paolo Bonzini
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=20191219131149.5973d2ba.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=marcandre.lureau@redhat.com \
--cc=pasic@linux.ibm.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@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 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).