Skip to content

Commit

Permalink
libvduse: Fix compiler warning with -Wshadow=local
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
huth authored and Markus Armbruster committed Oct 12, 2023
1 parent a51e512 commit 3cc72cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subprojects/libvduse/libvduse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3cc72cd

Please sign in to comment.