qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] hw/misc/arm_sysctl.c: Avoid shadowing local variable


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/4] hw/misc/arm_sysctl.c: Avoid shadowing local variable
Date: Fri, 22 Sep 2023 17:38:13 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

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>




reply via email to

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