Misc. warning fixes

This commit is contained in:
Matthijs Lavrijsen 2023-03-13 00:11:08 +01:00
parent 4ad9836d58
commit dea33fff9f
No known key found for this signature in database
GPG key ID: D40D1DBE299B83EA
4 changed files with 6 additions and 6 deletions

View file

@ -192,8 +192,8 @@ AnalyzeCi(
// Map file as SEC_IMAGE
WCHAR Path[MAX_PATH];
const CHAR NtoskrnlExe[] = "ntoskrnl.exe";
const CHAR CiDll[] = "CI.dll";
constexpr CHAR NtoskrnlExe[] = "ntoskrnl.exe";
constexpr CHAR CiDll[] = "CI.dll";
_snwprintf(Path, MAX_PATH / sizeof(WCHAR), L"%ls\\System32\\%hs",
SharedUserData->NtSystemRoot,

View file

@ -227,7 +227,7 @@ NtProcessStartupW(
Peb = Peb != nullptr ? NtCurrentPeb() : NtCurrentTeb()->ProcessEnvironmentBlock; // And this turd is to get Resharper to shut up about assigning to Peb before reading from it. Note LHS == RHS
// Get the command line from the startup parameters. If there isn't one, use the executable name
PRTL_USER_PROCESS_PARAMETERS Params = RtlNormalizeProcessParams(Peb->ProcessParameters);
const PRTL_USER_PROCESS_PARAMETERS Params = RtlNormalizeProcessParams(Peb->ProcessParameters);
const PWCHAR CommandLineBuffer = Params->CommandLine.Buffer == nullptr || Params->CommandLine.Buffer[0] == L'\0'
? Params->ImagePathName.Buffer
: Params->CommandLine.Buffer;

View file

@ -36,7 +36,6 @@ STATIC CHAR16* mDriverPaths[] = {
};
extern
VOID
EFIAPI
BmSetMemoryTypeInformationVariable(
@ -48,6 +47,7 @@ STATIC
BOOLEAN
EFIAPI
WaitForKey(
VOID
)
{
EFI_INPUT_KEY Key = { 0, 0 };
@ -55,7 +55,7 @@ WaitForKey(
gBS->WaitForEvent(1, &gST->ConIn->WaitForKey, &Index);
gST->ConIn->ReadKeyStroke(gST->ConIn, &Key);
return (BOOLEAN)(Key.ScanCode != SCAN_ESC);
return Key.ScanCode != SCAN_ESC;
}
#if CONFIGURE_DRIVER

View file

@ -400,7 +400,7 @@ DisablePatchGuard(
// Print info
PRINT_KERNEL_PATCH_MSG(L"\r\n Patched KeInitAmd64SpecificState [RVA: 0x%X].\r\n",
(UINT32)(KeInitAmd64SpecificState - ImageBase));
PRINT_KERNEL_PATCH_MSG(L" Patched %S [RVA: 0x%X].\r\n",
PRINT_KERNEL_PATCH_MSG(L" Patched %ls [RVA: 0x%X].\r\n",
FuncName, (UINT32)(CcInitializeBcbProfiler - ImageBase));
if (ExpLicenseWatchInitWorker != NULL)
{