All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Song Gao <gaosong@loongson.cn>
Cc: qemu-devel@nongnu.org,  armbru@redhat.com,
	richard.henderson@linaro.org,  philmd@redhat.com,
	yangxiaojuan@loongson.cn,  maobibo@loongson.cn
Subject: Re: [PATCH 1/1] target/loongarch: Clean up local variable shadowing
Date: Wed, 04 Oct 2023 12:34:07 +0200	[thread overview]
Message-ID: <87ediak76o.fsf@pond.sub.org> (raw)
In-Reply-To: <20230926071253.3601021-1-gaosong@loongson.cn> (Song Gao's message of "Tue, 26 Sep 2023 15:12:53 +0800")

Song Gao <gaosong@loongson.cn> writes:

> Fix:
>
>   [1839/2601] Compiling C object libqemu-loongarch64-softmmu.fa.p/hw_loongarch_virt.c.o
>   ../hw/loongarch/virt.c: In function 'loongarch_irq_init':
>   ../hw/loongarch/virt.c:665:14: warning: declaration of 'i' shadows a previous local [-Wshadow=compatible-local]
>        for (int i = 0; i < num; i++) {
>                 ^
>   ../hw/loongarch/virt.c:582:19: note: shadowed declaration is here
>        int cpu, pin, i, start, num;
>
> Signed-off-by: Song Gao <gaosong@loongson.cn>
> ---
>  hw/loongarch/virt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/loongarch/virt.c b/hw/loongarch/virt.c
> index 2629128aed..b0a004f860 100644
> --- a/hw/loongarch/virt.c
> +++ b/hw/loongarch/virt.c
> @@ -662,7 +662,7 @@ static void loongarch_irq_init(LoongArchMachineState *lams)
>                              sysbus_mmio_get_region(d, 2));
>  
>      /* Connect pch_pic irqs to extioi */
> -    for (int i = 0; i < num; i++) {
> +    for (i = 0; i < num; i++) {
>          qdev_connect_gpio_out(DEVICE(d), i, qdev_get_gpio_in(extioi, i));
>      }

Reviewed-by: Markus Armbruster <armbru@redhat.com>

and queued.  Thanks!



      reply	other threads:[~2023-10-04 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-26  7:12 [PATCH 1/1] target/loongarch: Clean up local variable shadowing Song Gao
2023-10-04 10:34 ` Markus Armbruster [this message]

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=87ediak76o.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=gaosong@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=yangxiaojuan@loongson.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.