From fefeb0d3da8a81ef77b899edb27eae21391705cb Mon Sep 17 00:00:00 2001 From: Ibrahim Zidan Date: Sun, 12 Jul 2026 02:34:33 +0300 Subject: [PATCH] Raise warning level on MSVC to 4 (highest) and disable few warnings that reports intended behavior/features Signed-off-by: Ibrahim Zidan --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01f669472..e1a362a14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -157,7 +157,9 @@ test_function_def(setrlimit) if(MSVC) # Warnings - add_compile_options(/W3) + add_compile_options(/W4) + add_compile_options(/wd4127) # Silence constant expression warning as we need them sometimes and they're heavily used + add_compile_options(/wd4200 /wd4152) # Silence warning of non-standard extension being used in our code add_compile_options(/wd4244 /wd4267) # Disable int conversion possible lose of data add_compile_options(/wd4100) # Disable unused parameter warning mostly due to BUILDIN and similar functions having unused parameters add_compile_options(/wd4312) # Disable conversion to greater size warning (see 0xdeadbeef pointers)