]> git.proxmox.com Git - mirror_qemu.git/commit
hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow
authorThomas Huth <thuth@redhat.com>
Wed, 4 Oct 2023 09:53:02 +0000 (11:53 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 6 Oct 2023 08:56:54 +0000 (10:56 +0200)
commit5ae80e6297080b3592b4658d92acfdba5255fc8b
tree813eebedd93dfb5012e3ddb82010920501cd75dc
parent5d63cb15bf2667486117690de02bbb85c1a36942
hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow

"len" is used as parameter of the functions virtio_write_config()
and virtio_read_config(), and additionally as a local variable,
so this causes a compiler warning when compiling with "-Wshadow"
and can be confusing for the reader. Rename the local variables
to "caplen" to avoid this problem.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20231004095302.99037-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
hw/virtio/virtio-pci.c