Local variables shadowing other local variables or parameters make the
code needlessly hard to understand.  Bugs love to hide in such code.
Evidence: "[PATCH v3 1/7] migration/rdma: Fix save_page method to fail
on polling error".

This patch removes the local variable shadowing. Tested by adding:

    --extra-cflags='-Wshadow=local -Wno-error=shadow=local 
-Wno-error=shadow=compatible-local'

To configure

Alistair Francis (4):
  hw/riscv: opentitan: Fixup local variables shadowing
  target/riscv: cpu: Fixup local variables shadowing
  target/riscv: vector_helper: Fixup local variables shadowing
  softmmu/device_tree: Fixup local variables shadowing

 hw/riscv/opentitan.c         | 2 +-
 softmmu/device_tree.c        | 6 +++---
 target/riscv/cpu.c           | 4 ++--
 target/riscv/vector_helper.c | 7 ++++---
 4 files changed, 10 insertions(+), 9 deletions(-)

-- 
2.41.0


Reply via email to