]> granicus.if.org Git - vim/commitdiff
patch 8.2.2091: MS-Windows: build warnings v8.2.2091
authorBram Moolenaar <Bram@vim.org>
Fri, 4 Dec 2020 18:42:52 +0000 (19:42 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 4 Dec 2020 18:42:52 +0000 (19:42 +0100)
Problem:    MS-Windows: build warnings.
Solution:   Add a #pragma to suppress the deprecation warning. (Ken Takata)
            Avoid using a non-ASCII character. (closes #7421)

src/message.c
src/os_win32.c
src/version.c

index 3f6d56e5deebde5302a44444947c52e7d68589f8..43e7e5e526d20eb1fde1b25b7104350e74c5073f 100644 (file)
@@ -1861,7 +1861,7 @@ msg_prt_line(char_u *s, int list)
            col += (*mb_ptr2cells)(s);
            if (l >= MB_MAXBYTES)
            {
-               STRCPY(buf, "¿");
+               STRCPY(buf, "?");
            }
            else if (lcs_nbsp != NUL && list
                    && (mb_ptr2char(s) == 160
index 21b9b01279df0dedebe0b15aa1f7bd8d4186983a..2f9ecdc9eaee6c6a994cbae34ff3a21e01a9ad08 100644 (file)
@@ -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)
 
index 2061ea0a3249c309b534741b5c735e1ae0a81bb6..0002ef88822fa9b7b7f897d2eb706d95b19f19cc 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2091,
 /**/
     2090,
 /**/