From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: stefanha@redhat.com, Thomas Huth <thuth@redhat.com>,
Xie Yongji <xieyongji@bytedance.com>
Subject: [PULL 1/5] libvduse: Fix compiler warning with -Wshadow=local
Date: Thu, 12 Oct 2023 16:57:17 +0200 [thread overview]
Message-ID: <20231012145721.77039-2-armbru@redhat.com> (raw)
In-Reply-To: <20231012145721.77039-1-armbru@redhat.com>
From: Thomas Huth <thuth@redhat.com>
No need to declare a new variable with the same name here,
we can simple re-use the one from the top of the function.
With this change, the file now compiles fine with -Wshadow=local.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231006120819.480792-1-thuth@redhat.com>
Reviewed-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
subprojects/libvduse/libvduse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c
index 377959a0b4..21ffbb5b8d 100644
--- a/subprojects/libvduse/libvduse.c
+++ b/subprojects/libvduse/libvduse.c
@@ -1031,7 +1031,7 @@ int vduse_dev_handler(VduseDev *dev)
/* The iova will be updated by iova_to_va() later, so just remove it */
vduse_iova_remove_region(dev, req.iova.start, req.iova.last);
for (i = 0; i < dev->num_queues; i++) {
- VduseVirtq *vq = &dev->vqs[i];
+ vq = &dev->vqs[i];
if (vq->ready) {
if (vduse_queue_update_vring(vq, vq->vring.desc_addr,
vq->vring.avail_addr,
--
2.41.0
next prev parent reply other threads:[~2023-10-12 14:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-12 14:57 [PULL 0/5] -Wshadow=local patches for 2023-10-12 Markus Armbruster
2023-10-12 14:57 ` Markus Armbruster [this message]
2023-10-12 14:57 ` [PULL 2/5] libvhost-user: Fix compiler warning with -Wshadow=local Markus Armbruster
2023-10-12 14:57 ` [PULL 3/5] hw/virtio/virtio-gpu: Fix compiler warning when compiling with -Wshadow Markus Armbruster
2023-10-12 14:57 ` [PULL 4/5] contrib/vhost-user-gpu: " Markus Armbruster
2023-10-12 14:57 ` [PULL 5/5] target/i386: fix shadowed variable pasto Markus Armbruster
2023-10-16 19:20 ` [PULL 0/5] -Wshadow=local patches for 2023-10-12 Stefan Hajnoczi
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=20231012145721.77039-2-armbru@redhat.com \
--to=armbru@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=thuth@redhat.com \
--cc=xieyongji@bytedance.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 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).