From 47ac147c4cf16c0a3f06ba99352e86580885fdc8 Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Sun, 4 Dec 2011 19:44:59 +0100 Subject: [PATCH] extra warnings from gcc --- build/CMakeLists.txt | 1 + test/CMakeLists.txt | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt index f501db5..6cb57f6 100644 --- a/build/CMakeLists.txt +++ b/build/CMakeLists.txt @@ -4,6 +4,7 @@ project (CPP_UTILS_LIB) set(CMAKE_CXX_COMPILER "/usr/lib/colorgcc/bin/g++") set (CXX_FLAGS "-Wall -Wextra -pedantic -Weffc++ -Wshadow " + "-Wpointer-arith -Wcast-qual " "-ggdb -fprofile-arcs -ftest-coverage -std=c++0x") add_definitions( ${CXX_FLAGS} ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b76249b..3bc25b5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "/usr/lib/colorgcc/bin/g++") set (CXX_FLAGS "-Wall -Wextra -pedantic -Weffc++ -Wshadow " + "-Wpointer-arith -Wcast-qual " "-ggdb -fprofile-arcs -ftest-coverage --std=c++0x " ) add_definitions( ${CXX_FLAGS} ) @@ -18,21 +19,21 @@ if(CXXTEST_FOUND) generated_main.cpp Fixture.hpp -# test_ArgParse.hpp -# test_Common.hpp -# test_ConditionalVariable.hpp -# test_Multiton.hpp -# test_Mutex.hpp + test_ArgParse.hpp + test_Common.hpp + test_ConditionalVariable.hpp + test_Multiton.hpp + test_Mutex.hpp test_ObjectPool.hpp -# test_ScopedLock.hpp -# test_Semaphore.hpp -# test_Singleton_DCLP.hpp -# test_Singleton_call_once.hpp -# # test_Singleton.hpp Cannot test private member, Ficture.hpp loads it -# test_Singleton_meyers.hpp -# test_Thread.hpp -# test_ThreadPool.hpp -# # test_Timer.hpp Takes too much time&buggy + test_ScopedLock.hpp + test_Semaphore.hpp + test_Singleton_DCLP.hpp + test_Singleton_call_once.hpp + # test_Singleton.hpp Cannot test private member, Ficture.hpp loads it + test_Singleton_meyers.hpp + test_Thread.hpp + test_ThreadPool.hpp + # test_Timer.hpp Takes too much time&buggy ) target_link_libraries(testCppUtils CppUtils gcov) endif()