From adf2c22d94c3bc8f2593b0fc3b63e29ed360510f Mon Sep 17 00:00:00 2001 From: Andre Weissflog Date: Thu, 30 Jan 2025 18:36:02 +0100 Subject: add -Wextra-semi to CI tests and fix resulting warnings --- tests/CMakeLists.txt | 9 +++++++-- tests/functional/sokol_test.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 89e01a7f..dff7ebf8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -51,12 +51,17 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") set(c_flags ${c_flags} /W4 /WX /D_CRT_SECURE_NO_WARNINGS) set(cxx_flags ${cxx_flags} /W4 /WX /EHsc /D_CRT_SECURE_NO_WARNINGS) else() - set(c_flags ${c_flags} -Wall -Wextra -Werror -Wsign-conversion -Wstrict-prototypes) - set(cxx_flags ${cxx_flags} -Wall -Wextra -Werror -Wsign-conversion -fno-rtti -fno-exceptions) + set(c_flags ${c_flags} -Wall -Wextra -Werror -Wsign-conversion -Wstrict-prototypes -Wextra-semi) + set(cxx_flags ${cxx_flags} -Wall -Wextra -Werror -Wsign-conversion -fno-rtti -fno-exceptions -Wextra-semi) if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") set(c_flags ${c_flags} -Wno-missing-field-initializers) set(cxx_flags ${cxx_flags} -Wno-missing-field-initializers) endif() + if (OSX_IOS) + # temp fix for PVRTC formats + set(c_flags ${c_flags} -Wno-deprecated-declarations) + set(cxx_flags ${cxx_flags} -Wno-deprecated-declarations) + endif() if (USE_ANALYZER) # FIXME: consider using clang-tidy via CMAKE_CXX_CLANG_TIDY: https://ortogonal.github.io/cmake-clang-tidy/ # with the default settings this spams the output with irrelevant C++ coding style warnings in 3rd party libs though diff --git a/tests/functional/sokol_test.c b/tests/functional/sokol_test.c index 29528b68..88b0d29e 100644 --- a/tests/functional/sokol_test.c +++ b/tests/functional/sokol_test.c @@ -4,4 +4,4 @@ //------------------------------------------------------------------------------ #include "utest.h" -UTEST_MAIN(); +UTEST_MAIN() -- cgit v1.2.3