summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-05-26 20:11:41 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2025-06-25 14:33:23 +0900
commitbd7d210d1c33d78a364d18f0c346bb63e69bb6ad (patch)
treedec052a9a7756985b3695a6fc187ba3fa72987be
parent8eadf30cf464e040f95f9d11b832b35a96afea99 (diff)
Win: Suppress false warnings from Visual C 17.14.1
https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942? It is not able to silence "operands are different enum types" warnings, even using an explicit cast, as the message says.
-rw-r--r--win32/Makefile.sub4
1 files changed, 4 insertions, 0 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index f5b76bbe02..714736c6ba 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -281,6 +281,10 @@ WARNFLAGS = -W2 -wd4100 -wd4127 -wd4210 -wd4214 -wd4255 -wd4574 \
!else
WARNFLAGS = -W2
!endif
+!if $(MSC_VER) >= 1944
+# https://developercommunity.visualstudio.com/t/warning-C5287:-operands-are-different-e/10877942
+WARNFLAGS = $(WARNFLAGS) -wd5287
+!endif
!endif
WERRORFLAG = -WX
!if !defined(CFLAGS_NO_ARCH)