From: Alistair Francis <alistair23@gmail.com>
To: david@gibson.dropbear.id.au, qemu-riscv@nongnu.org,
qemu-devel@nongnu.org
Cc: bmeng.cn@gmail.com, alistair.francis@wdc.com,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
palmer@dabbelt.com, alistair23@gmail.com,
dbarboza@ventanamicro.com,
Alistair Francis <Alistair.Francis@wdc.com>,
liweiwei@iscas.ac.cn, Bin Meng <bin.meng@windriver.com>
Subject: [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local
Date: Mon, 25 Sep 2023 14:30:19 +1000 [thread overview]
Message-ID: <20230925043023.71448-1-alistair.francis@wdc.com> (raw)
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
next reply other threads:[~2023-09-25 4:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-25 4:30 Alistair Francis [this message]
2023-09-25 4:30 ` [PATCH 1/4] hw/riscv: opentitan: Fixup local variables shadowing Alistair Francis
2023-09-25 9:08 ` Daniel Henrique Barboza
2023-09-25 4:30 ` [PATCH 2/4] target/riscv: cpu: " Alistair Francis
2023-09-25 9:09 ` Daniel Henrique Barboza
2023-09-25 4:30 ` [PATCH 3/4] target/riscv: vector_helper: " Alistair Francis
2023-09-25 9:09 ` Daniel Henrique Barboza
2023-09-25 4:30 ` [PATCH 4/4] softmmu/device_tree: " Alistair Francis
2023-09-25 9:10 ` Daniel Henrique Barboza
2023-09-25 9:11 ` [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local Daniel Henrique Barboza
2023-09-29 6:56 ` Markus Armbruster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230925043023.71448-1-alistair.francis@wdc.com \
--to=alistair23@gmail.com \
--cc=alistair.francis@wdc.com \
--cc=bin.meng@windriver.com \
--cc=bmeng.cn@gmail.com \
--cc=david@gibson.dropbear.id.au \
--cc=dbarboza@ventanamicro.com \
--cc=liweiwei@iscas.ac.cn \
--cc=palmer@dabbelt.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).