qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 2/4] aspeed: Clean up local variable shadowing


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/4] aspeed: Clean up local variable shadowing
Date: Fri, 22 Sep 2023 20:23:33 +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:59, Cédric Le Goater wrote:
Remove superfluous local 'irq' variables and use the one define at the
top of the routine. This fixes warnings in aspeed_soc_ast2600_realize()
such as :

   ../hw/arm/aspeed_ast2600.c: In function ‘aspeed_soc_ast2600_realize’:
   ../hw/arm/aspeed_ast2600.c:420:18: warning: declaration of ‘irq’ shadows a 
previous local [-Wshadow=compatible-local]
     420 |         qemu_irq irq = aspeed_soc_get_irq(s, ASPEED_DEV_TIMER1 + i);
         |                  ^~~
   ../hw/arm/aspeed_ast2600.c:312:14: note: shadowed declaration is here
     312 |     qemu_irq irq;
         |              ^~~

Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
  hw/arm/aspeed_ast2600.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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