diff --git a/src/detection/os/os_windows.cpp b/src/detection/os/os_windows.cpp index 9f8c2570c..287063449 100644 --- a/src/detection/os/os_windows.cpp +++ b/src/detection/os/os_windows.cpp @@ -31,8 +31,7 @@ static const char* getOsNameByWinbrand(FFstrbuf* osName) //https://dennisbabkin.com/blog/?t=how-to-tell-the-real-version-of-windows-your-app-is-running-on#ver_string if(HMODULE __attribute__((__cleanup__(wrapFreeLibrary))) hWinbrand = LoadLibraryW(L"winbrand.dll")) { - PWSTR(WINAPI* BrandingFormatString)(PCWSTR); - (FARPROC&)BrandingFormatString = GetProcAddress(hWinbrand, "BrandingFormatString"); + auto BrandingFormatString = (PWSTR(WINAPI*)(PCWSTR))GetProcAddress(hWinbrand, "BrandingFormatString"); if(!BrandingFormatString) return "GetProcAddress(BrandingFormatString) failed"; diff --git a/src/detection/terminalshell/terminalshell_windows.cpp b/src/detection/terminalshell/terminalshell_windows.cpp index 135388650..a475643df 100644 --- a/src/detection/terminalshell/terminalshell_windows.cpp +++ b/src/detection/terminalshell/terminalshell_windows.cpp @@ -147,7 +147,8 @@ static uint32_t getShellInfo(FFTerminalShellResult* result, uint32_t pid) if(snapshot) { - MODULEENTRY32W module = { .dwSize = sizeof(module) }; + MODULEENTRY32W module; + module.dwSize = sizeof(module); for(BOOL success = Module32FirstW(snapshot, &module); success; success = Module32NextW(snapshot, &module)) { if(wcsncmp(module.szModule, L"clink_dll_", wcslen(L"clink_dll_")) == 0)