aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2019-12-18 18:20:00 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2020-01-07 16:22:55 +0100
commitacd51e41311f8a2c2dc16dfd66334d2eda4f80f6 (patch)
tree5129e0ff02e0136af5e97e2e65a8f9012bdc356f
parentc263158ed9a0cfe62a49a7415874a7ce69c3e6b2 (diff)
downloadqemu-acd51e41311f8a2c2dc16dfd66334d2eda4f80f6.zip
qemu-acd51e41311f8a2c2dc16dfd66334d2eda4f80f6.tar.gz
qemu-acd51e41311f8a2c2dc16dfd66334d2eda4f80f6.tar.bz2
hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandler
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 hw/usb/redirect.o hw/usb/redirect.c: In function ‘usbredir_chardev_event’: hw/usb/redirect.c:1361:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 1361 | switch (event) { | ^~~~~~ hw/usb/redirect.c:1361:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/usb/redirect.c:1361: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> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20191218172009.8868-6-philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--hw/usb/redirect.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index e0f5ca6..ddc1a59 100644
--- a/hw/usb/redirect.c
+++ b/hw/usb/redirect.c
@@ -1370,6 +1370,11 @@ static void usbredir_chardev_event(void *opaque, int event)
DPRINTF("chardev close\n");
qemu_bh_schedule(dev->chardev_close_bh);
break;
+ case CHR_EVENT_BREAK:
+ case CHR_EVENT_MUX_IN:
+ case CHR_EVENT_MUX_OUT:
+ /* Ignore */
+ break;
}
}