Skip to content
Snippets Groups Projects
Commit d58cc13f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Move the #pragma warning to just before the call to GetVersionEx()

Needed for building sbbsexec.dll

I guess #pramga warning only affects the following source line.

Apparently we're disabling this warning effectively via other means in all
other MSVC projects.
parent 8084997b
No related branches found
No related tags found
No related merge requests found
Pipeline #7406 passed
......@@ -785,7 +785,6 @@ char* os_version(char *str, size_t size)
static NTSTATUS (WINAPI *pRtlGetVersion)(PRTL_OSVERSIONINFOW lpVersionInformation) = NULL;
winver.dwOSVersionInfoSize=sizeof(winver);
#pragma warning(suppress : 4996)
if(pRtlGetVersion == NULL) {
HINSTANCE ntdll = LoadLibrary("ntdll.dll");
......@@ -794,9 +793,10 @@ char* os_version(char *str, size_t size)
FreeLibrary(ntdll);
}
}
if(pRtlGetVersion == NULL)
if(pRtlGetVersion == NULL) {
#pragma warning(suppress : 4996) // error C4996: 'GetVersionExA': was declared deprecated
GetVersionEx(&winver);
else
} else
pRtlGetVersion((PRTL_OSVERSIONINFOW)&winver);
switch(winver.dwPlatformId) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment