From 05f23cfb18fff5261657dcda17e259bf75beb427 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 1 Feb 2025 23:29:24 +0100 Subject: [PATCH 1/2] Elevate Windows CI to /W3 (sans C4018/C4267) C4018[1] is about unsigned/signed comparisons; C4267[2] is about conversion from `size_t` to a "smaller" type. We likely should resolve these warnings in the long run, but for now, it seems like a no brainer to elevate to `/W3` even if we have to exempt two additional categories of warnings, since we can catch some others. And we no longer need to elevate C4010[3] to a higher level to catch it. [1] [2] [3] --- .github/scripts/windows/build_task.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index b1b994e2034d..689beda3ddac 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -32,7 +32,7 @@ if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS% if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack -set CFLAGS=/W2 /WX /w14013 /wd4146 /wd4244 +set CFLAGS=/W3 /WX /wd4018 /wd4146 /wd4244 /wd4267 cmd /c configure.bat ^ --enable-snapshot-build ^ From 576f876059e8704cc7315a3ad0a59bef2819e14e Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sun, 2 Feb 2025 11:29:36 +0100 Subject: [PATCH 2/2] Add comments regarding the disabled warnings --- .github/scripts/windows/build_task.bat | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/scripts/windows/build_task.bat b/.github/scripts/windows/build_task.bat index 689beda3ddac..89b1b8f19a9d 100644 --- a/.github/scripts/windows/build_task.bat +++ b/.github/scripts/windows/build_task.bat @@ -32,6 +32,10 @@ if "%THREAD_SAFE%" equ "0" set ADD_CONF=%ADD_CONF% --disable-zts if "%INTRINSICS%" neq "" set ADD_CONF=%ADD_CONF% --enable-native-intrinsics=%INTRINSICS% if "%ASAN%" equ "1" set ADD_CONF=%ADD_CONF% --enable-sanitizer --enable-debug-pack +rem C4018: comparison: signed/unsigned mismatch +rem C4146: unary minus operator applied to unsigned type +rem C4244: type conversion, possible loss of data +rem C4267: 'size_t' type conversion, possible loss of data set CFLAGS=/W3 /WX /wd4018 /wd4146 /wd4244 /wd4267 cmd /c configure.bat ^