[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/32] target/ppc: Clean up local variable shadowing in kvm_arch_*
|
From: |
Markus Armbruster |
|
Subject: |
[PULL 26/32] target/ppc: Clean up local variable shadowing in kvm_arch_*_registers() |
|
Date: |
Fri, 6 Oct 2023 13:36:51 +0200 |
From: Cédric Le Goater <clg@kaod.org>
Remove extra 'i' variable to fix this warning :
../target/ppc/kvm.c: In function ‘kvm_arch_put_registers’:
../target/ppc/kvm.c:963:13: warning: declaration of ‘i’ shadows a previous
local [-Wshadow=compatible-local]
963 | int i;
| ^
../target/ppc/kvm.c:906:9: note: shadowed declaration is here
906 | int i;
| ^
../target/ppc/kvm.c: In function ‘kvm_arch_get_registers’:
../target/ppc/kvm.c:1265:13: warning: declaration of ‘i’ shadows a previous
local [-Wshadow=compatible-local]
1265 | int i;
| ^
../target/ppc/kvm.c:1212:9: note: shadowed declaration is here
1212 | int i, ret;
| ^
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-ID: <20231006053526.1031252-1-clg@kaod.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
target/ppc/kvm.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c
index 51112bd367..d0e2dcdc77 100644
--- a/target/ppc/kvm.c
+++ b/target/ppc/kvm.c
@@ -960,8 +960,6 @@ int kvm_arch_put_registers(CPUState *cs, int level)
}
if (cap_one_reg) {
- int i;
-
/*
* We deliberately ignore errors here, for kernels which have
* the ONE_REG calls, but don't support the specific
@@ -1262,8 +1260,6 @@ int kvm_arch_get_registers(CPUState *cs)
}
if (cap_one_reg) {
- int i;
-
/*
* We deliberately ignore errors here, for kernels which have
* the ONE_REG calls, but don't support the specific
--
2.41.0
- [PULL 00/32] -Wshadow=local patches patches for 2023-10-06, Markus Armbruster, 2023/10/06
- [PULL 10/32] hw/audio/soundhw: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 27/32] hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 26/32] target/ppc: Clean up local variable shadowing in kvm_arch_*_registers(),
Markus Armbruster <=
- [PULL 06/32] hw/net/vhost_net: Silence compiler warning when compiling with -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 21/32] util/guest-random: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 09/32] dump: Silence compiler warning in dump code when compiling with -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 05/32] audio/ossaudio: Fix compiler warning with -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 01/32] hw/cxl: Fix local variable shadowing of cap_hdrs, Markus Armbruster, 2023/10/06
- [PULL 07/32] hw/virtio/virtio-pci: Avoid compiler warning with -Wshadow, Markus Armbruster, 2023/10/06
- [PULL 31/32] linux-user/syscall.c: clean up local variable shadowing in TARGET_NR_getcpu, Markus Armbruster, 2023/10/06
- [PULL 18/32] semihosting: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 13/32] os-posix: Clean up global variable shadowing, Markus Armbruster, 2023/10/06
- [PULL 32/32] linux-user/syscall.c: clean up local variable shadowing in xattr syscalls, Markus Armbruster, 2023/10/06