[edk2-devel] [PATCH 1/1] OvmfPkg/VirtioSerialDxe: fix RELEASE build error

Ard Biesheuvel ardb at kernel.org
Wed May 10 13:54:08 UTC 2023


On Wed, 10 May 2023 at 11:18, Ard Biesheuvel <ardb at kernel.org> wrote:
>
> On Wed, 10 May 2023 at 09:39, Ard Biesheuvel <ardb at kernel.org> wrote:
> >
> > On Wed, 10 May 2023 at 09:34, Gerd Hoffmann <kraxel at redhat.com> wrote:
> > >
> > > EventNames is used to pretty-print debug log messages.
> > > Add #ifdef to only include it in debug builds.
> > > Fixes a clang build failure.
> > >
> > > Reported-by: Rebecca Cran <rebecca at bsdio.com>
> > > Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
> >
> > Queued up as #4381 - thanks.
> >
>
> This appears to break the build
>
> https://github.com/tianocore/edk2/pull/4381

Actually, looking at the code, I think the Clang diagnostic is highly
dubious here. The non-DEBUG code takes the ARRAY_SIZE() of EventNames,
and so the #ifdef will result in a compiler error.

I suppose we can work around this, but we might also just add
-Wunneeded-internal-declaration to the clang cflags for RELEASE


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104559): https://edk2.groups.io/g/devel/message/104559
Mute This Topic: https://groups.io/mt/98801293/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list