qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: qemu-devel@nongnu.org
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	[thread overview]
Message-ID: <20191218184123.GE7025@minyard.net> (raw)
In-Reply-To: <20191218172009.8868-3-philmd@redhat.com>

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 <cminyard@mvista.com>

> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> v2: Add all missing enums
> 
> Cc: Corey Minyard <minyard@acm.org>
> ---
>  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
> 


  reply	other threads:[~2019-12-18 18:42 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 [this message]
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 ` [RFC PATCH v2 04/14] hw/usb/dev-serial: Explicit we ignore few " Philippe Mathieu-Daudé
2019-12-18 17:20 ` [RFC PATCH v2 05/14] hw/usb/redirect: " 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=20191218184123.GE7025@minyard.net \
    --to=minyard@acm.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.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).