diff options
author | Chen Qun <kuhn.chenqun@huawei.com> | 2020-08-27 19:03:06 +0800 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2020-09-01 11:58:32 +0200 |
commit | 8b616beebcbb70444c2dbc07b210bd3798cf8462 (patch) | |
tree | 77218eb53ecbb868e1341e5ff305b1ffbbf270de /hw/virtio/vhost-user.c | |
parent | fa71dd531c12ad9a05cdd78392e9fc2a30ea921d (diff) |
hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()
Clang static code analyzer show warning:
hw/virtio/vhost-user.c:606:9: warning: Value stored to 'mr' is never read
mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20200827110311.164316-6-kuhn.chenqun@huawei.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'hw/virtio/vhost-user.c')
-rw-r--r-- | hw/virtio/vhost-user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index d7e2423762..9c5b4f7fbc 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-user.c @@ -603,7 +603,7 @@ static void scrub_shadow_regions(struct vhost_dev *dev, */ for (i = 0; i < dev->mem->nregions; i++) { reg = &dev->mem->regions[i]; - mr = vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd); + vhost_user_get_mr_data(reg->userspace_addr, &offset, &fd); if (fd > 0) { ++fd_num; } |