From: "Gerd Hoffmann" <kraxel@redhat.com>
To: devel@edk2.groups.io
Cc: Pawel Polawski <ppolawsk@redhat.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Jordan Justen <jordan.l.justen@intel.com>,
Oliver Steffen <osteffen@redhat.com>,
Jiewen Yao <jiewen.yao@intel.com>,
Rebecca Cran <rebecca@bsdio.com>
Subject: [PATCH 1/1] OvmfPkg/VirtioSerialDxe: fix RELEASE build error
Date: Wed, 10 May 2023 09:33:58 +0200 [thread overview]
Message-ID: <20230510073358.79042-1-kraxel@redhat.com> (raw)
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
next reply other threads:[~2023-05-10 7:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-10 7:33 Gerd Hoffmann [this message]
2023-05-10 7:39 ` [edk2-devel] [PATCH 1/1] OvmfPkg/VirtioSerialDxe: fix RELEASE build error Ard Biesheuvel
2023-05-10 9:18 ` Ard Biesheuvel
2023-05-10 13:54 ` Ard Biesheuvel
2023-05-10 15:06 ` Ard Biesheuvel
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-list 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=20230510073358.79042-1-kraxel@redhat.com \
--to=devel@edk2.groups.io \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox