From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, qemu-devel@nongnu.org
Cc: Eric Auger <eric.auger@redhat.com>,
Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH 2/4] hw/misc/arm_sysctl.c: Avoid shadowing local variable
Date: Fri, 22 Sep 2023 17:38:13 +0200 [thread overview]
Message-ID: <6a79b3ab-e726-2f29-2ded-20c6dc32c170@linaro.org> (raw)
In-Reply-To: <20230922152944.3583438-3-peter.maydell@linaro.org>
On 22/9/23 17:29, Peter Maydell wrote:
> Avoid shadowing a local variable in arm_sysctl_write():
>
> ../../hw/misc/arm_sysctl.c: In function ‘arm_sysctl_write’:
> ../../hw/misc/arm_sysctl.c:537:26: warning: declaration of ‘val’ shadows a parameter [-Wshadow=local]
> 537 | uint32_t val;
> | ^~~
> ../../hw/misc/arm_sysctl.c:388:39: note: shadowed declaration is here
> 388 | uint64_t val, unsigned size)
> | ~~~~~~~~~^~~
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> hw/misc/arm_sysctl.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
next prev parent reply other threads:[~2023-09-22 15:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 15:29 [PATCH 0/4] arm: fix some -Wshadow warnings Peter Maydell
2023-09-22 15:29 ` [PATCH 1/4] hw/intc/arm_gicv3_its: Avoid shadowing variable in do_process_its_cmd() Peter Maydell
2023-09-22 15:38 ` Philippe Mathieu-Daudé
2023-09-26 15:06 ` Eric Auger
2023-09-22 15:29 ` [PATCH 2/4] hw/misc/arm_sysctl.c: Avoid shadowing local variable Peter Maydell
2023-09-22 15:38 ` Philippe Mathieu-Daudé [this message]
2023-09-26 15:06 ` Eric Auger
2023-09-22 15:29 ` [PATCH 3/4] hw/arm/smmuv3.c: Avoid shadowing variable Peter Maydell
2023-09-22 15:38 ` Philippe Mathieu-Daudé
2023-09-26 15:00 ` Eric Auger
2023-09-22 15:29 ` [PATCH 4/4] hw/arm/smmuv3-internal.h: Don't use locals in statement macros Peter Maydell
2023-09-26 15:00 ` Eric Auger
2023-09-29 6:16 ` [PATCH 0/4] arm: fix some -Wshadow warnings 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=6a79b3ab-e726-2f29-2ded-20c6dc32c170@linaro.org \
--to=philmd@linaro.org \
--cc=armbru@redhat.com \
--cc=eric.auger@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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).