All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org,  Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH] system/vl: Use global &bdo_queue in configure_blockdev()
Date: Mon, 09 Oct 2023 14:41:06 +0200	[thread overview]
Message-ID: <878r8c2ckd.fsf@pond.sub.org> (raw)
In-Reply-To: <9cd1675b-22a4-ee2a-fde0-bb87c7c5bd26@linaro.org> ("Philippe Mathieu-Daudé"'s message of "Mon, 9 Oct 2023 13:54:50 +0200")

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

> On 9/10/23 12:26, Markus Armbruster wrote:
>> Philippe Mathieu-Daudé <philmd@linaro.org> writes:
>> 
>>> Commit d11bf9bf0f ("vl: Factor configure_blockdev() out of main()")
>>> passed &bdo_queue as argument, but this isn't really necessary since
>>> there is only one call, so we still use the global variable.
>>>
>>> Dropping the &bdo_queue argument allows to silence this global shadow
>>> warning:
>>>
>>>    softmmu/vl.c:678:54: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
>>>    static void configure_blockdev(BlockdevOptionsQueue *bdo_queue,
>>>                                                         ^
>>>    softmmu/vl.c:172:29: note: previous declaration is here
>>>    static BlockdevOptionsQueue bdo_queue = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue);
>> Not sure this is an improvement.  Up to Paolo, I guess.
>
> Any alternative suggestion? I'm looking at enabling -Wshadow with Clang
> to avoid Clang users not getting the -Wshadow=local warnings until a
> maintainer test their patches on CI.

Rename to @bdos?



      reply	other threads:[~2023-10-09 12:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-09  9:31 [PATCH] system/vl: Use global &bdo_queue in configure_blockdev() Philippe Mathieu-Daudé
2023-10-09 10:26 ` Markus Armbruster
2023-10-09 11:54   ` Philippe Mathieu-Daudé
2023-10-09 12:41     ` 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=878r8c2ckd.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.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 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.