Raise warning level on MSVC to 4 (highest) and disable few warnings that reports intended behavior/features

Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
This commit is contained in:
Ibrahim Zidan 2026-07-12 02:34:33 +03:00
parent 809802a0e8
commit fefeb0d3da
No known key found for this signature in database
GPG key ID: 0F0A43C7FE4C7B9A

View file

@ -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)