From 8b616beebcbb70444c2dbc07b210bd3798cf8462 Mon Sep 17 00:00:00 2001 From: Chen Qun Date: Thu, 27 Aug 2020 19:03:06 +0800 Subject: 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 Signed-off-by: Chen Qun Reviewed-by: Raphael Norwitz Reviewed-by: Michael S. Tsirkin Message-Id: <20200827110311.164316-6-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- hw/virtio/vhost-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/virtio') diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index d7e2423..9c5b4f7 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; } -- cgit v1.1