summaryrefslogtreecommitdiff
path: root/src/os_win32.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-04 19:42:52 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-04 19:42:52 +0100
commit29d2f45c8855fd98897c5db92d896c161e95d0f1 (patch)
tree87c23be9cda892daedafbdfe8edcdb04d07e5426 /src/os_win32.c
parentc5e6a7179d7dee4315b412b56e172bb1ff092d3e (diff)
downloadvim-git-29d2f45c8855fd98897c5db92d896c161e95d0f1.tar.gz
patch 8.2.2091: MS-Windows: build warningsv8.2.2091
Problem: MS-Windows: build warnings. Solution: Add a #pragma to suppress the deprecation warning. (Ken Takata) Avoid using a non-ASCII character. (closes #7421)
Diffstat (limited to 'src/os_win32.c')
-rw-r--r--src/os_win32.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/os_win32.c b/src/os_win32.c
index 21b9b0127..2f9ecdc9e 100644
--- a/src/os_win32.c
+++ b/src/os_win32.c
@@ -860,6 +860,12 @@ win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable)
}
#endif
+#ifdef _MSC_VER
+// Suppress the deprecation warning for using GetVersionEx().
+// It is needed for implementing "windowsversion()".
+# pragma warning(push)
+# pragma warning(disable: 4996)
+#endif
/*
* Set "win8_or_later" and fill in "windowsVersion" if possible.
*/
@@ -890,6 +896,9 @@ PlatformId(void)
done = TRUE;
}
}
+#ifdef _MSC_VER
+# pragma warning(pop)
+#endif
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)