diff options
author | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-08-21 22:22:32 +0000 |
---|---|---|
committer | sleske <sleske@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2013-08-21 22:22:32 +0000 |
commit | 9b4d2d7bc71becdfce4a69e84d5e4e132895f8a9 (patch) | |
tree | 3cba305144b7698c39d6e22fa4535051b7ef8130 /CMakeLists.txt | |
parent | d1555aaf6af096a8f2414db58a4d17874176ed1d (diff) | |
download | navit-9b4d2d7bc71becdfce4a69e84d5e4e132895f8a9.tar.gz |
Fix:core:Add -Wextra (with some warnings disabled), fix warning.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@5588 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'CMakeLists.txt')
-rwxr-xr-x | CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dbf976fd8..739f70601 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -634,9 +634,16 @@ CHECK_FUNCTION_EXISTS (_atoi64 HAVE__ATOI64) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) +# Compile with -Wall -Wextra. We need all the help we can get from the compiler :-). +# Disabled warnings: +# -Wno-missing-field-initializers: Used a lot, does not seem problematic. +# -Wno-unused-parameter: Unfortunately occurs frequently because of +# functions implementing the interface of a plugin. +# -Wno-sign-compare: We currently just use int almost everywhere. +# Unclear if it's really worth correcting. if(CMAKE_COMPILER_IS_GNUCC OR CCMAKE_COMPILER_IS_GNUCXX) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wcast-align -Wpointer-arith -Wmissing-prototypes ") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align -Wpointer-arith ") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wcast-align -Wpointer-arith -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes ") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wcast-align -Wpointer-arith -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare ") endif() if (EXTRA_DEFINES) |