qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [RFC PATCH v2 04/14] hw/usb/dev-serial: Explicit we ignore few QEMUChrEvent in IOEventHandler
Date: Wed, 18 Dec 2019 18:19:59 +0100	[thread overview]
Message-ID: <20191218172009.8868-5-philmd@redhat.com> (raw)
In-Reply-To: <20191218172009.8868-1-philmd@redhat.com>

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:

  hw/usb/dev-serial.c: In function ‘usb_serial_event’:
  hw/usb/dev-serial.c:468:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch]
    468 |     switch (event) {
        |     ^~~~~~
  hw/usb/dev-serial.c:468: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: Gerd Hoffmann <kraxel@redhat.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
---
 hw/usb/dev-serial.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c
index 45cc74128a..2ba6870b37 100644
--- a/hw/usb/dev-serial.c
+++ b/hw/usb/dev-serial.c
@@ -479,6 +479,10 @@ static void usb_serial_event(void *opaque, int event)
                 usb_device_detach(&s->dev);
             }
             break;
+        case CHR_EVENT_MUX_IN:
+        case CHR_EVENT_MUX_OUT:
+            /* Ignore */
+            break;
     }
 }
 
-- 
2.21.0



  parent reply	other threads:[~2019-12-18 17:26 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
2019-12-18 17:19 ` Philippe Mathieu-Daudé [this message]
2019-12-18 17:20 ` [RFC PATCH v2 05/14] hw/usb/redirect: Explicit we ignore few " 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=20191218172009.8868-5-philmd@redhat.com \
    --to=philmd@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.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).