Skip to content

Commit

Permalink
hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Chen Qun <[email protected]>
Reviewed-by: Raphael Norwitz <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Laurent Vivier <[email protected]>
  • Loading branch information
Kuhn-Chen authored and vivier committed Sep 1, 2020
1 parent fa71dd5 commit 8b616be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/virtio/vhost-user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b616be

Please sign in to comment.