Skip to content

Commit 29d2f45

Browse files
committed
patch 8.2.2091: MS-Windows: build warnings
Problem: MS-Windows: build warnings. Solution: Add a #pragma to suppress the deprecation warning. (Ken Takata) Avoid using a non-ASCII character. (closes #7421)
1 parent c5e6a71 commit 29d2f45

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/message.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1861,7 +1861,7 @@ msg_prt_line(char_u *s, int list)
18611861
col += (*mb_ptr2cells)(s);
18621862
if (l >= MB_MAXBYTES)
18631863
{
1864-
STRCPY(buf, "¿");
1864+
STRCPY(buf, "?");
18651865
}
18661866
else if (lcs_nbsp != NUL && list
18671867
&& (mb_ptr2char(s) == 160

src/os_win32.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,12 @@ win32_enable_privilege(LPTSTR lpszPrivilege, BOOL bEnable)
860860
}
861861
#endif
862862

863+
#ifdef _MSC_VER
864+
// Suppress the deprecation warning for using GetVersionEx().
865+
// It is needed for implementing "windowsversion()".
866+
# pragma warning(push)
867+
# pragma warning(disable: 4996)
868+
#endif
863869
/*
864870
* Set "win8_or_later" and fill in "windowsVersion" if possible.
865871
*/
@@ -890,6 +896,9 @@ PlatformId(void)
890896
done = TRUE;
891897
}
892898
}
899+
#ifdef _MSC_VER
900+
# pragma warning(pop)
901+
#endif
893902

894903
#if !defined(FEAT_GUI_MSWIN) || defined(VIMDLL)
895904

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -750,6 +750,8 @@ static char *(features[]) =
750750

751751
static int included_patches[] =
752752
{ /* Add new patch number below this line */
753+
/**/
754+
2091,
753755
/**/
754756
2090,
755757
/**/

0 commit comments

Comments
 (0)