[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow
|
From: |
Markus Armbruster |
|
Subject: |
Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow |
|
Date: |
Wed, 04 Oct 2023 13:33:36 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Thomas Huth <thuth@redhat.com> writes:
> On 04/10/2023 12.58, Markus Armbruster wrote:
>> Thomas Huth <thuth@redhat.com> writes:
>>
>>> "len" is used as parameter of the function virtio_write_config()
>>> and as a local variable, so this causes a compiler warning
>>> when compiling with "-Wshadow" and can be confusing for the reader.
>>> Rename the local variable to "caplen" to avoid this problem.
>>>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
[...]
>> I see the same warning in virtio_read_config(). Care to patch that,
>> too?
>
> Patch is already on the list:
> 20231004095302.99037-1-thuth@redhat.com/">https://lore.kernel.org/qemu-devel/20231004095302.99037-1-thuth@redhat.com/
Awesome, thanks!
- [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Thomas Huth, 2023/10/04
- Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Philippe Mathieu-Daudé, 2023/10/04
- Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Michael S. Tsirkin, 2023/10/04
- Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Thomas Huth, 2023/10/04
- Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Markus Armbruster, 2023/10/04
- Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Markus Armbruster, 2023/10/04