intel_iommu: Fix shadow local variables on "size"
commita082739eb390d2aad679b5efa9afc40cfa2a496d
authorPeter Xu <peterx@redhat.com>
Fri, 22 Sep 2023 16:04:10 +0000 (22 12:04 -0400)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 29 Sep 2023 08:07:19 +0000 (29 10:07 +0200)
tree60aa7eea0661f157e677f611c5e194d58563c3d2
parent62fcc4e872cf01350e4dd395c60c5c726121417f
intel_iommu: Fix shadow local variables on "size"

This patch fixes the warning of shadowed local variable:

../hw/i386/intel_iommu.c: In function ‘vtd_address_space_unmap’:
../hw/i386/intel_iommu.c:3773:18: warning: declaration of ‘size’ shadows a previous local [-Wshadow=compatible-local]
 3773 |         uint64_t size = mask + 1;
      |                  ^~~~
../hw/i386/intel_iommu.c:3747:12: note: shadowed declaration is here
 3747 |     hwaddr size, remain;
      |            ^~~~

Cc: Jason Wang <jasowang@redhat.com>
Cc: Eric Auger <eric.auger@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-ID: <20230922160410.138786-1-peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
hw/i386/intel_iommu.c