[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local
From: |
Alistair Francis |
Subject: |
[PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local |
Date: |
Mon, 25 Sep 2023 14:30:19 +1000 |
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
- [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local,
Alistair Francis <=
- [PATCH 1/4] hw/riscv: opentitan: Fixup local variables shadowing, Alistair Francis, 2023/09/25
- [PATCH 2/4] target/riscv: cpu: Fixup local variables shadowing, Alistair Francis, 2023/09/25
- [PATCH 3/4] target/riscv: vector_helper: Fixup local variables shadowing, Alistair Francis, 2023/09/25
- [PATCH 4/4] softmmu/device_tree: Fixup local variables shadowing, Alistair Francis, 2023/09/25
- Re: [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local, Daniel Henrique Barboza, 2023/09/25