1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-05-14 18:13:53 +00:00

general: add -Wshorten-64-to-32 compiler flag & suppress warnings

(ticket #351, props Axel Waggershauser)
This commit is contained in:
gitlost
2026-02-26 18:23:21 +00:00
parent 9ef5bc7298
commit bd33953fc1
24 changed files with 106 additions and 102 deletions

View File

@@ -72,6 +72,10 @@ if(NOT MSVC) # Use default warnings if MSVC otherwise inundated
if(C_COMPILER_FLAG_WSHADOW)
add_compile_options("-Wshadow")
endif()
check_c_compiler_flag("-Wshorten-64-to-32" C_COMPILER_FLAG_WSHORTEN64TO32)
if(C_COMPILER_FLAG_WSHORTEN64TO32)
add_compile_options("-Wshorten-64-to-32")
endif()
check_c_compiler_flag("-Wundef" C_COMPILER_FLAG_WUNDEF)
if(C_COMPILER_FLAG_WUNDEF)
add_compile_options("-Wundef")