|
| From: | Philippe Mathieu-Daudé |
| Subject: | Re: [PATCH] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow |
| Date: | Wed, 4 Oct 2023 10:00:10 +0200 |
| User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 |
On 4/10/23 09:55, Thomas Huth wrote:
"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> --- hw/virtio/virtio-pci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
| [Prev in Thread] | Current Thread | [Next in Thread] |