Fixed some warnings.

This commit is contained in:
jief 2023-11-20 19:58:56 +01:00
parent 485a77a65e
commit 495dd319c3
6 changed files with 12 additions and 5 deletions

View File

@ -469,7 +469,7 @@ static void transmitS8Printf(const char* buf, unsigned int nbchar, void* context
mMemLog->Cursor += nbchar; mMemLog->Cursor += nbchar;
} }
const char* printf_lite_get_timestamp() const char* printf_lite_get_timestamp(void)
{ {
UINT64 dTStartSec; UINT64 dTStartSec;
UINT64 dTStartMs; UINT64 dTStartMs;

View File

@ -551,7 +551,7 @@ DebugPrintLevelEnabled (
are not included in a module. 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)
/** /**

View File

@ -745,7 +745,7 @@ LogPerformanceMeasurement (
Otherwise, the source lines between PERF_CODE_BEGIN() and PERF_CODE_END() are not included in a module. 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. Macro that declares a section of performance measurement source code.

View File

@ -337,7 +337,6 @@ SmcGetKeyInfoImpl (IN APPLE_SMC_IO_PROTOCOL *This,
OUT SMC_KEY_ATTRIBUTES *Attributes OUT SMC_KEY_ATTRIBUTES *Attributes
) )
{ {
UINT32 Num = 0;
SMC_STACK *TmpStack = SmcStack; SMC_STACK *TmpStack = SmcStack;
if (!Size || !Type || !Attributes) { if (!Size || !Type || !Attributes) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
@ -349,7 +348,6 @@ SmcGetKeyInfoImpl (IN APPLE_SMC_IO_PROTOCOL *This,
*Attributes = TmpStack->Attributes; *Attributes = TmpStack->Attributes;
return EFI_SUCCESS; return EFI_SUCCESS;
} }
Num++;
TmpStack = TmpStack->Next; TmpStack = TmpStack->Next;
} }
return EFI_NOT_FOUND; return EFI_NOT_FOUND;

View File

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

View File

@ -171,6 +171,9 @@ int printlib_tests(void)
loggf(F("SIZE_T_MAX=%zu\n"), SIZE_T_MAX); loggf(F("SIZE_T_MAX=%zu\n"), SIZE_T_MAX);
loggf(F("\n")); loggf(F("\n"));
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wformat"
loggf(F("PRId16=%a\n"), PRId16); loggf(F("PRId16=%a\n"), PRId16);
loggf(F("PRIu16=%a\n"), PRIu16); loggf(F("PRIu16=%a\n"), PRIu16);
loggf(F("PRId32=%a\n"), PRId32); loggf(F("PRId32=%a\n"), PRId32);
@ -179,6 +182,9 @@ int printlib_tests(void)
loggf(F("PRIu32=%a\n"), PRIu32); loggf(F("PRIu32=%a\n"), PRIu32);
loggf(F("PRId64=%a\n"), PRId64); loggf(F("PRId64=%a\n"), PRId64);
loggf(F("PRIu64=%a\n"), PRIu64); loggf(F("PRIu64=%a\n"), PRIu64);
#pragma GCC diagnostic pop
loggf(F("\n")); loggf(F("\n"));
#endif #endif