On Wed, 10 May 2023 at 09:34, Gerd Hoffmann <kra...@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 <rebe...@bsdio.com>
> Signed-off-by: Gerd Hoffmann <kra...@redhat.com>

Queued up as #4381 - thanks.


> ---
>  OvmfPkg/VirtioSerialDxe/VirtioSerial.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/OvmfPkg/VirtioSerialDxe/VirtioSerial.c 
> b/OvmfPkg/VirtioSerialDxe/VirtioSerial.c
> index bfb2b324eadf..5fb4ce31914b 100644
> --- a/OvmfPkg/VirtioSerialDxe/VirtioSerial.c
> +++ b/OvmfPkg/VirtioSerialDxe/VirtioSerial.c
> @@ -25,6 +25,7 @@
>
>  STATIC LIST_ENTRY  mVirtioSerialList;
>
> +#if !defined (MDEPKG_NDEBUG)
>  STATIC CONST CHAR8  *EventNames[] = {
>    [VIRTIO_SERIAL_DEVICE_READY]  = "device-ready",
>    [VIRTIO_SERIAL_DEVICE_ADD]    = "device-add",
> @@ -35,6 +36,7 @@ STATIC CONST CHAR8  *EventNames[] = {
>    [VIRTIO_SERIAL_PORT_OPEN]     = "port-open",
>    [VIRTIO_SERIAL_PORT_NAME]     = "port-name",
>  };
> +#endif
>
>  VOID
>  EFIAPI
> --
> 2.40.1
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#104502): https://edk2.groups.io/g/devel/message/104502
Mute This Topic: https://groups.io/mt/98801293/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to