qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local


From: Daniel Henrique Barboza
Subject: Re: [PATCH 0/4] RISC-V: Work towards enabling -Wshadow=local
Date: Mon, 25 Sep 2023 06:11:01 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

CCing Markus since he might want to add these in his shadow-next tree.


Daniel

On 9/25/23 01:30, Alistair Francis wrote:
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(-)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]