[edk2-devel] [PATCH 12/13] BhyvePkg: __attribute__ doesn't exist on MSVC toolchains

Rebecca Cran posted 13 patches 5 years, 9 months ago
[edk2-devel] [PATCH 12/13] BhyvePkg: __attribute__ doesn't exist on MSVC toolchains
Posted by Rebecca Cran 5 years, 9 months ago
Only use __attribute__ ((unused)) when building using a compiler which
claims to support GNU C.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 BhyvePkg/Library/PlatformBootManagerLib/BdsPlatform.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/BhyvePkg/Library/PlatformBootManagerLib/BdsPlatform.c b/BhyvePkg/Library/PlatformBootManagerLib/BdsPlatform.c
index 48f7473788..4a08d12ece 100644
--- a/BhyvePkg/Library/PlatformBootManagerLib/BdsPlatform.c
+++ b/BhyvePkg/Library/PlatformBootManagerLib/BdsPlatform.c
@@ -1358,7 +1358,9 @@ PlatformBdsConnectSequence (
   Note that DxeSmmReadyToLock must be signaled after this function returns;
   otherwise the script wouldn't be saved actually.
 **/
+#if defined(__GNUC__)
 __attribute__((unused))
+#endif
 STATIC
 VOID
 SaveS3BootScript (
-- 
2.26.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#57437): https://edk2.groups.io/g/devel/message/57437
Mute This Topic: https://groups.io/mt/73045120/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-