diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 34cea4037..7d7fba859 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,10 +17,12 @@ set_source_files_properties(kernel/version.c PROPERTIES COMPILE_DEFINITIONS ERESSEA_VERSION="${ERESSEA_VERSION}") ENDIF() -IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_CLANG) +IF (CMAKE_COMPILER_IS_GNUCC) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable") +ENDIF() +IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wconversion -Wno-sign-conversion") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wsign-compare -Wall -Werror -Wno-unknown-pragmas -Wstrict-prototypes -Wpointer-arith -Wno-char-subscripts -Wno-long-long") - SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unused-but-set-variable") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") add_definitions(-DHAVE__BOOL) ELSEIF(MSVC) diff --git a/src/kernel/messages.test.c b/src/kernel/messages.test.c index fc6079dfe..c391c8720 100644 --- a/src/kernel/messages.test.c +++ b/src/kernel/messages.test.c @@ -74,4 +74,5 @@ CuSuite *get_messages_suite(void) { SUITE_ADD_TEST(suite, test_merge_split); SUITE_ADD_TEST(suite, test_message); return suite; -} \ No newline at end of file +} + diff --git a/src/spells/flyingship.h b/src/spells/flyingship.h index 087357b9e..8b7bf0874 100644 --- a/src/spells/flyingship.h +++ b/src/spells/flyingship.h @@ -22,4 +22,5 @@ extern "C" { } #endif -#endif \ No newline at end of file +#endif + diff --git a/src/util/functions.c b/src/util/functions.c index 82792faaf..3776820eb 100644 --- a/src/util/functions.c +++ b/src/util/functions.c @@ -51,4 +51,5 @@ void register_function(pf_generic fun, const char *name) void free_functions(void) { cb_clear(&cb_functions); -} \ No newline at end of file +} +