public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/1] OvmfPkg/VirtioSerialDxe: fix RELEASE build error
@ 2023-05-10  7:33 Gerd Hoffmann
  2023-05-10  7:39 ` [edk2-devel] " Ard Biesheuvel
  0 siblings, 1 reply; 5+ messages in thread
From: Gerd Hoffmann @ 2023-05-10  7:33 UTC (permalink / raw)
  To: devel
  Cc: Pawel Polawski, Gerd Hoffmann, Ard Biesheuvel, Jordan Justen,
	Oliver Steffen, Jiewen Yao, Rebecca Cran

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@bsdio.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-05-10 15:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-10  7:33 [PATCH 1/1] OvmfPkg/VirtioSerialDxe: fix RELEASE build error Gerd Hoffmann
2023-05-10  7:39 ` [edk2-devel] " Ard Biesheuvel
2023-05-10  9:18   ` Ard Biesheuvel
2023-05-10 13:54     ` Ard Biesheuvel
2023-05-10 15:06       ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox