Build with -Wfloat-conversion + fix all warnings

This commit is contained in:
Anonymous Maarten authored and GitHub committed 2024-06-03 21:33:29 +00:00
1 parent 17c459e384
commit a919774fe4
38 files changed
+199 -203

No files matched your search

+5
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")