]> git.proxmox.com Git - mirror_qemu.git/commit - hw/usb/redirect.c
hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandler
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Wed, 18 Dec 2019 17:20:00 +0000 (18:20 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jan 2020 15:22:55 +0000 (16:22 +0100)
commitacd51e41311f8a2c2dc16dfd66334d2eda4f80f6
tree5129e0ff02e0136af5e97e2e65a8f9012bdc356f
parentc263158ed9a0cfe62a49a7415874a7ce69c3e6b2
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>
hw/usb/redirect.c