Build with -Wfloat-conversion + fix all warnings

This commit is contained in:
Anonymous Maarten 2024-06-03 23:33:29 +02:00 committed by GitHub
parent 17c459e384
commit a919774fe4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 199 additions and 203 deletions

View file

@ -59,6 +59,11 @@ function(SDL_AddCommonCompilerFlags TARGET)
sdl_target_compile_option_all_languages(${TARGET} "-Wundef")
endif()
check_c_compiler_flag(-Wfloat-conversion HAVE_GCC_WFLOAT_CONVERSION)
if(HAVE_GCC_WFLOAT_CONVERSION)
sdl_target_compile_option_all_languages(${TARGET} "-Wfloat-conversion")
endif()
check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
if(HAVE_GCC_NO_STRICT_ALIASING)
sdl_target_compile_option_all_languages(${TARGET} "-fno-strict-aliasing")