workaround for gcc

Signed-off-by: Slice <sergey.slice@gmail.com>
This commit is contained in:
Slice 2023-11-22 19:10:59 +03:00
parent 544d3cee6d
commit 95fac19588
3 changed files with 9 additions and 2 deletions

@ -1 +1 @@
Subproject commit c24f740b07c97efec0b772d914a9bdab448f3039 Subproject commit a38c3a3705021e3808d62d135e0a4089d74986b5

View File

@ -1454,10 +1454,14 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArray<UINT1
XArray<UINT16>& mHandle17 = *mHandle17Ptr; XArray<UINT16>& mHandle17 = *mHandle17Ptr;
XString8 deviceLocator; XString8 deviceLocator;
XString8 bankLocator; XString8 bankLocator;
#if defined (__clang__)
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wvla-extension" #pragma clang diagnostic ignored "-Wvla-extension"
#endif
UINT8 channelMap[mMemory17.size()]; // mMemory17.size() == SlotCounts UINT8 channelMap[mMemory17.size()]; // mMemory17.size() == SlotCounts
#if defined (__clang__)
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif
UINT8 expectedCount = 0; UINT8 expectedCount = 0;
UINT8 channels = 2; UINT8 channels = 2;
XBool insertingEmpty = true; XBool insertingEmpty = true;

View File

@ -38,9 +38,10 @@ static void panic_(const char* format, VA_LIST va)
printf(FATAL_ERROR_MSG); printf(FATAL_ERROR_MSG);
abort(); abort();
} }
#if defined (__clang__)
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-noreturn" #pragma clang diagnostic ignored "-Winvalid-noreturn"
#endif
void panic(const char* format, ...) void panic(const char* format, ...)
{ {
@ -59,7 +60,9 @@ void panic(const char* format, ...)
panic_(format, va); // panic doesn't return panic_(format, va); // panic doesn't return
#endif #endif
} }
#if defined (__clang__)
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif
/* /*
* Future version to warn about problem but offer the possibility to try to continue * Future version to warn about problem but offer the possibility to try to continue