Skip to content

Commit

Permalink
target/ppc: Clean up local variable shadowing in kvm_arch_*_registers()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
legoater authored and Markus Armbruster committed Oct 6, 2023
1 parent 8b7b9c5 commit 0edc9e4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions target/ppc/kvm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0edc9e4

Please sign in to comment.