From: Philippe Mathieu-Daudé Date: Wed, 18 Dec 2019 17:19:57 +0000 (+0100) Subject: hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler X-Git-Tag: v5.0.0-rc0~151^2~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d043b1ec03406442cea52680756ba19b1581f67;p=thirdparty%2Fqemu.git hw/ipmi: Explicit we ignore some 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: hw/ipmi/ipmi_bmc_extern.c: In function ‘chr_event’: hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value ‘CHR_EVENT_BREAK’ not handled in switch [-Werror=switch] 389 | switch (event) { | ^~~~~~ hw/ipmi/ipmi_bmc_extern.c:389:5: error: enumeration value ‘CHR_EVENT_MUX_IN’ not handled in switch [-Werror=switch] hw/ipmi/ipmi_bmc_extern.c:389: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é Acked-by: Corey Minyard Reviewed-by: Marc-André Lureau Reviewed-by: Richard Henderson Message-Id: <20191218172009.8868-3-philmd@redhat.com> Signed-off-by: Paolo Bonzini --- diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index 450926e5fb0..adf2afe7282 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_extern.c @@ -435,6 +435,12 @@ static void chr_event(void *opaque, int event) k->handle_rsp(s, ibe->outbuf[0], ibe->inbuf + 1, 3); } break; + + case CHR_EVENT_BREAK: + case CHR_EVENT_MUX_IN: + case CHR_EVENT_MUX_OUT: + /* Ignore */ + break; } }