[Analyzers][CPP]Changes to fix warning 26493 on PowerToys/tools (#23674)

This commit is contained in:
sosssego
2023-02-08 14:01:40 +00:00
committed by GitHub
parent c7f761a589
commit 10252c3c1e
9 changed files with 17 additions and 14 deletions

View File

@@ -166,7 +166,7 @@ void ReportWindowsVersion(const filesystem::path& tmpDir)
{
NTSTATUS(WINAPI * RtlGetVersion)
(LPOSVERSIONINFOEXW) = nullptr;
*(FARPROC*)&RtlGetVersion = GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
*reinterpret_cast<FARPROC*>(& RtlGetVersion) = GetProcAddress(GetModuleHandleA("ntdll"), "RtlGetVersion");
if (RtlGetVersion)
{
osInfo.dwOSVersionInfoSize = sizeof(osInfo);