All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-trivial@nongnu.org
Subject: Re: [PATCH] hw/net/vhost_net: Silence compiler warning when compiling with -Wshadow
Date: Wed, 4 Oct 2023 04:57:32 -0400	[thread overview]
Message-ID: <20231004045724-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20231004084939.96349-1-thuth@redhat.com>

On Wed, Oct 04, 2023 at 10:49:39AM +0200, Thomas Huth wrote:
> Rename the innermost local variables to avoid compiler warnings
> with "-Wshadow".
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Michael S. Tsirkin <mst@redhat.com>

feel free to merge

> ---
>  hw/net/vhost_net.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
> index 57427a3997..e8e1661646 100644
> --- a/hw/net/vhost_net.c
> +++ b/hw/net/vhost_net.c
> @@ -313,8 +313,8 @@ fail:
>                  /* Queue might not be ready for start */
>                  continue;
>              }
> -            int r = vhost_net_set_backend(&net->dev, &file);
> -            assert(r >= 0);
> +            int ret = vhost_net_set_backend(&net->dev, &file);
> +            assert(ret >= 0);
>          }
>      }
>      if (net->nc->info->poll) {
> @@ -629,8 +629,8 @@ err_start:
>      if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) {
>          file.fd = VHOST_FILE_UNBIND;
>          file.index = idx;
> -        int r = vhost_net_set_backend(&net->dev, &file);
> -        assert(r >= 0);
> +        int ret = vhost_net_set_backend(&net->dev, &file);
> +        assert(ret >= 0);
>      }
>  
>      vhost_dev_stop(&net->dev, vdev, false);
> -- 
> 2.41.0



  reply	other threads:[~2023-10-04  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-04  8:49 [PATCH] hw/net/vhost_net: Silence compiler warning when compiling with -Wshadow Thomas Huth
2023-10-04  8:57 ` Michael S. Tsirkin [this message]
2023-10-08  5:27   ` Jason Wang
2023-10-04 10:44 ` Markus Armbruster

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=20231004045724-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.