[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 05/10] hw/virtio/vhost-user:Remove dead assignment in scru
From: |
Li Qiang |
Subject: |
Re: [PATCH v2 05/10] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions() |
Date: |
Wed, 26 Aug 2020 18:23:23 +0800 |
Chen Qun <kuhn.chenqun@huawei.com> 于2020年8月25日周二 下午7:28写道:
>
> 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: Li Qiang <liq3ea@gmail.com>
> ---
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Raphael Norwitz <raphael.norwitz@nutanix.com>
> ---
> 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
>
>
- [PATCH v2 00/10] trivial patchs for static code analyzer fixes, Chen Qun, 2020/08/25
- [PATCH v2 05/10] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions(), Chen Qun, 2020/08/25
- Re: [PATCH v2 05/10] hw/virtio/vhost-user:Remove dead assignment in scrub_shadow_regions(),
Li Qiang <=
- [PATCH v2 01/10] hw/arm/virt-acpi-build:Remove dead assignment in build_madt(), Chen Qun, 2020/08/25
- [PATCH v2 03/10] target/arm/translate-a64:Remove dead assignment in handle_scalar_simd_shli(), Chen Qun, 2020/08/25
- [PATCH v2 02/10] hw/arm/omap1:Remove redundant statement in omap_clkdsp_read(), Chen Qun, 2020/08/25
- [PATCH v2 04/10] target/arm/translate-a64:Remove redundant statement in disas_simd_two_reg_misc_fp16(), Chen Qun, 2020/08/25