[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/32] hw/ide/ahci: Clean up local variable shadowing
From: |
Markus Armbruster |
Subject: |
[PULL 11/32] hw/ide/ahci: Clean up local variable shadowing |
Date: |
Fri, 6 Oct 2023 13:36:36 +0200 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
Fix:
hw/ide/ahci.c:1577:23: error: declaration shadows a local variable
[-Werror,-Wshadow]
IDEState *s = &ad->port.ifs[j];
^
hw/ide/ahci.c:1569:29: note: previous declaration is here
void ahci_uninit(AHCIState *s)
^
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231004120019.93101-3-philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
hw/ide/ahci.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index d0a774bc17..fcc5476e9e 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1622,9 +1622,7 @@ void ahci_uninit(AHCIState *s)
AHCIDevice *ad = &s->dev[i];
for (j = 0; j < 2; j++) {
- IDEState *s = &ad->port.ifs[j];
-
- ide_exit(s);
+ ide_exit(&ad->port.ifs[j]);
}
object_unparent(OBJECT(&ad->port));
}
--
2.41.0
- [PULL 03/32] target/ppc: Rename variables to avoid local variable shadowing in VUPKPX, (continued)
- [PULL 03/32] target/ppc: Rename variables to avoid local variable shadowing in VUPKPX, Markus Armbruster, 2023/10/06
- [PULL 19/32] ui/cocoa: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 22/32] semihosting/arm-compat: Clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 20/32] util/cutils: Clean up global variable shadowing in get_relocated_path(), Markus Armbruster, 2023/10/06
- [PULL 25/32] trace/control: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 28/32] linux-user/flatload: clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 17/32] qom/object_interfaces: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 24/32] sysemu/tpm: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 30/32] linux-user/syscall.c: clean up local variable shadowing in do_ioctl_dm(), Markus Armbruster, 2023/10/06
- [PULL 02/32] target/loongarch: Clean up local variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 11/32] hw/ide/ahci: Clean up local variable shadowing,
Markus Armbruster <=
- [PULL 23/32] softmmu/vl: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 08/32] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 04/32] hw/i386: changes towards enabling -Wshadow=local for x86 machines, Markus Armbruster, 2023/10/06
- [PULL 15/32] qemu-img: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- Re: [PULL 00/32] -Wshadow=local patches patches for 2023-10-06, Stefan Hajnoczi, 2023/10/09