Skip to content

Commit

Permalink
workaround for gcc
Browse files Browse the repository at this point in the history
Signed-off-by: Slice <[email protected]>
  • Loading branch information
SergeySlice committed Nov 22, 2023
1 parent 544d3ce commit 95fac19
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion OpenCorePkg
4 changes: 4 additions & 0 deletions rEFIt_UEFI/Platform/smbios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1454,10 +1454,14 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArray<UINT1
XArray<UINT16>& mHandle17 = *mHandle17Ptr;
XString8 deviceLocator;
XString8 bankLocator;
#if defined (__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvla-extension"
#endif
UINT8 channelMap[mMemory17.size()]; // mMemory17.size() == SlotCounts
#if defined (__clang__)
#pragma clang diagnostic pop
#endif
UINT8 expectedCount = 0;
UINT8 channels = 2;
XBool insertingEmpty = true;
Expand Down
5 changes: 4 additions & 1 deletion rEFIt_UEFI/PlatformPOSIX/posix/abort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ static void panic_(const char* format, VA_LIST va)
printf(FATAL_ERROR_MSG);
abort();
}

#if defined (__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-noreturn"
#endif

void panic(const char* format, ...)
{
Expand All @@ -59,7 +60,9 @@ void panic(const char* format, ...)
panic_(format, va); // panic doesn't return
#endif
}
#if defined (__clang__)
#pragma clang diagnostic pop
#endif

/*
* Future version to warn about problem but offer the possibility to try to continue
Expand Down

0 comments on commit 95fac19

Please sign in to comment.