[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] system/vl: Use global &bdo_queue in configure_blockdev()
|
From: |
Markus Armbruster |
|
Subject: |
Re: [PATCH] system/vl: Use global &bdo_queue in configure_blockdev() |
|
Date: |
Mon, 09 Oct 2023 12:26:42 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
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.
> Remove a spurious empty line.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>