diff --git a/Library/MemLogLibDefault/MemLogLib.c b/Library/MemLogLibDefault/MemLogLib.c index 3da0a95af..4596a0c9d 100644 --- a/Library/MemLogLibDefault/MemLogLib.c +++ b/Library/MemLogLibDefault/MemLogLib.c @@ -469,7 +469,7 @@ static void transmitS8Printf(const char* buf, unsigned int nbchar, void* context mMemLog->Cursor += nbchar; } -const char* printf_lite_get_timestamp() +const char* printf_lite_get_timestamp(void) { UINT64 dTStartSec; UINT64 dTStartMs; diff --git a/MdePkg/Include/Library/DebugLib.h b/MdePkg/Include/Library/DebugLib.h index 4eaf08e84..2d8a67609 100644 --- a/MdePkg/Include/Library/DebugLib.h +++ b/MdePkg/Include/Library/DebugLib.h @@ -551,7 +551,7 @@ DebugPrintLevelEnabled ( are not included in a module. **/ -#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; } } while (FALSE) +#define DEBUG_CODE_END() __DebugCodeLocal = 0; __DebugCodeLocal++; (void)__DebugCodeLocal; } } while (FALSE) /** diff --git a/MdePkg/Include/Library/PerformanceLib.h b/MdePkg/Include/Library/PerformanceLib.h index 813c4f5d1..7a051dc98 100644 --- a/MdePkg/Include/Library/PerformanceLib.h +++ b/MdePkg/Include/Library/PerformanceLib.h @@ -745,7 +745,7 @@ LogPerformanceMeasurement ( Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module. **/ -#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; } } while (FALSE) +#define PERF_CODE_END() __PerformanceCodeLocal = 0; __PerformanceCodeLocal++; (void)__PerformanceCodeLocal; } } while (FALSE) /** Macro that declares a section of performance measurement source code. diff --git a/Protocols/SMCHelper/SMCHelper.c b/Protocols/SMCHelper/SMCHelper.c index c698e78b2..4dcab8ba1 100644 --- a/Protocols/SMCHelper/SMCHelper.c +++ b/Protocols/SMCHelper/SMCHelper.c @@ -337,7 +337,6 @@ SmcGetKeyInfoImpl (IN APPLE_SMC_IO_PROTOCOL *This, OUT SMC_KEY_ATTRIBUTES *Attributes ) { - UINT32 Num = 0; SMC_STACK *TmpStack = SmcStack; if (!Size || !Type || !Attributes) { return EFI_INVALID_PARAMETER; @@ -349,7 +348,6 @@ SmcGetKeyInfoImpl (IN APPLE_SMC_IO_PROTOCOL *This, *Attributes = TmpStack->Attributes; return EFI_SUCCESS; } - Num++; TmpStack = TmpStack->Next; } return EFI_NOT_FOUND; diff --git a/rEFIt_UEFI/Platform/smbios.cpp b/rEFIt_UEFI/Platform/smbios.cpp index baef145d7..87ab8ef96 100755 --- a/rEFIt_UEFI/Platform/smbios.cpp +++ b/rEFIt_UEFI/Platform/smbios.cpp @@ -1454,7 +1454,10 @@ void PatchTableType17(const SmbiosInjectedSettings& smbiosSettings, XArray& mHandle17 = *mHandle17Ptr; XString8 deviceLocator; XString8 bankLocator; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wvla-extension" UINT8 channelMap[mMemory17.size()]; // mMemory17.size() == SlotCounts +#pragma clang diagnostic pop UINT8 expectedCount = 0; UINT8 channels = 2; XBool insertingEmpty = true; diff --git a/rEFIt_UEFI/cpp_unit_test/printlib-test.cpp b/rEFIt_UEFI/cpp_unit_test/printlib-test.cpp index a7af8317d..18f6bd724 100644 --- a/rEFIt_UEFI/cpp_unit_test/printlib-test.cpp +++ b/rEFIt_UEFI/cpp_unit_test/printlib-test.cpp @@ -171,6 +171,9 @@ int printlib_tests(void) loggf(F("SIZE_T_MAX=%zu\n"), SIZE_T_MAX); loggf(F("\n")); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wformat" + loggf(F("PRId16=%a\n"), PRId16); loggf(F("PRIu16=%a\n"), PRIu16); loggf(F("PRId32=%a\n"), PRId32); @@ -179,6 +182,9 @@ int printlib_tests(void) loggf(F("PRIu32=%a\n"), PRIu32); loggf(F("PRId64=%a\n"), PRId64); loggf(F("PRIu64=%a\n"), PRIu64); + +#pragma GCC diagnostic pop + loggf(F("\n")); #endif