On Thu, Aug 13, 2020 at 03:37:06PM +0800, Chen Qun wrote: > 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]> > --- > Cc: "Michael S. Tsirkin" <[email protected]> > Cc: Raphael Norwitz <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]> feel free to merge through the trivial tree > --- > hw/virtio/vhost-user.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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; > } > -- > 2.23.0
