qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] intel_iommu: Fix shadow local variables on "size"


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] intel_iommu: Fix shadow local variables on "size"
Date: Fri, 22 Sep 2023 20:17:21 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 22/9/23 18:04, Peter Xu wrote:
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>
---
  hw/i386/intel_iommu.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]