mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 06:28:35 +00:00
build: enable MSVC level 3 warnings (#21934)
MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
This commit is contained in:
@@ -182,6 +182,9 @@ void early_init(mparm_T *paramp)
|
||||
#ifdef MSWIN
|
||||
OSVERSIONINFO ovi;
|
||||
ovi.dwOSVersionInfoSize = sizeof(ovi);
|
||||
// Disable warning about GetVersionExA being deprecated. There doesn't seem to be a conventient
|
||||
// replacement that doesn't add a ton of extra code as of writing this.
|
||||
# pragma warning(suppress : 4996)
|
||||
GetVersionEx(&ovi);
|
||||
snprintf(windowsVersion, sizeof(windowsVersion), "%d.%d",
|
||||
(int)ovi.dwMajorVersion, (int)ovi.dwMinorVersion);
|
||||
|
Reference in New Issue
Block a user