[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent i
From: |
Corey Minyard |
Subject: |
Re: [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler |
Date: |
Wed, 18 Dec 2019 12:41:23 -0600 |
User-agent: |
Mutt/1.9.4 (2018-02-28) |
On Wed, Dec 18, 2019 at 06:19:57PM +0100, Philippe Mathieu-Daudé 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:
>
> 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
Obviously a no-op, but better style. This is fine.
Acked-by: Corey Minyard <address@hidden>
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> v2: Add all missing enums
>
> Cc: Corey Minyard <address@hidden>
> ---
> hw/ipmi/ipmi_bmc_extern.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
> index 450926e5fb..adf2afe728 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;
> }
> }
>
> --
> 2.21.0
>
- [PATCH v2 00/14] chardev: Use QEMUChrEvent enum in IOEventHandler typedef, Philippe Mathieu-Daudé, 2019/12/18
- [PATCH v2 01/14] hw/ipmi: Remove unnecessary declarations, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 02/14] hw/ipmi: Explicit we ignore some QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 03/14] hw/char/terminal3270: Explicit ignored QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 04/14] hw/usb/dev-serial: Explicit we ignore few QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 05/14] hw/usb/redirect: Explicit we ignore few QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 06/14] ccid-card-passthru: Explicit we ignore QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 07/14] vhost-user-crypto: Explicit we ignore some QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18
- [RFC PATCH v2 08/14] vhost-user-net: Explicit we ignore few QEMUChrEvent in IOEventHandler, Philippe Mathieu-Daudé, 2019/12/18