Win: Suppress false warnings from Visual C 17.14.1
authorNobuyoshi Nakada <[email protected]>
Mon, 26 May 2025 11:11:41 +0000 (26 20:11 +0900)
committerNobuyoshi Nakada <[email protected]>
Tue, 27 May 2025 06:26:24 +0000 (27 15:26 +0900)
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.

win32/Makefile.sub

index 80225c3..7c125a4 100644 (file)
@@ -286,6 +286,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)