1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 09:21:50 -05:00

win32: Fix compilation warnings from commit 40c921f8b8

connect.c:953:5: warning: initializer element is not computable at load
                 time
connect.c:953:5: warning: missing initializer for field 'dwMinorVersion'
                 of 'OSVERSIONINFOEX'
curl_sspi.c:97:5: warning: initializer element is not computable at load
                  time
curl_sspi.c:97:5: warning: missing initializer for field 'szCSDVersion'
                  of 'OSVERSIONINFOEX'
This commit is contained in:
Steve Holme 2015-08-01 22:50:42 +01:00
parent a1b2a6bd93
commit 11ab3f8918
2 changed files with 11 additions and 2 deletions

View File

@ -950,7 +950,11 @@ void Curl_sndbufset(curl_socket_t sockfd)
}
#else
ULONGLONG cm;
OSVERSIONINFOEX osver = { sizeof osver, majorVersion, };
OSVERSIONINFOEX osver;
memset(&osver, 0, sizeof(osver));
osver.dwOSVersionInfoSize = sizeof(osver);
osver.dwMajorVersion = majorVersion;
cm = VerSetConditionMask(0, VER_MAJORVERSION, VER_GREATER_EQUAL);
cm = VerSetConditionMask(cm, VER_MINORVERSION, VER_GREATER_EQUAL);

View File

@ -94,7 +94,12 @@ CURLcode Curl_sspi_global_init(void)
securityDll = TRUE;
#else
ULONGLONG cm;
OSVERSIONINFOEX osver = { sizeof osver, majorVersion, 0, 0, platformId, };
OSVERSIONINFOEX osver;
memset(&osver, 0, sizeof(osver));
osver.dwOSVersionInfoSize = sizeof(osver);
osver.dwMajorVersion = majorVersion;
osver.dwPlatformId = platformId;
cm = VerSetConditionMask(0, VER_MAJORVERSION, VER_EQUAL);
cm = VerSetConditionMask(cm, VER_MINORVERSION, VER_GREATER_EQUAL);