From db0da5b044e381eba8b0a0cc237ab4784a10abf9 Mon Sep 17 00:00:00 2001 From: Simon Lynen Date: Mon, 7 Sep 2015 20:04:49 -0700 Subject: [PATCH 1/3] Fix warnings and switch on Werror --- CMakeLists.txt | 4 ++-- nabo/brute_force_cpu.cpp | 2 +- tests/knnbench.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5de770..eea58e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,8 +39,8 @@ endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(DOXYFILE_LATEX false) include(UseDoxygen) -# Compilation -add_definitions(-Wall) +# Switch on warnings and disable one python interface warning. +add_definitions(-Wall -Wextra -Wno-unused-local-typedefs -Wno-cpp -Werror) # Boost required for any and cstdint on MSVC < 2010 find_package(Boost COMPONENTS REQUIRED) diff --git a/nabo/brute_force_cpu.cpp b/nabo/brute_force_cpu.cpp index 89f160d..e4e8427 100644 --- a/nabo/brute_force_cpu.cpp +++ b/nabo/brute_force_cpu.cpp @@ -68,7 +68,7 @@ namespace Nabo } template - unsigned long BruteForceSearch::knn(const Matrix& query, IndexMatrix& indices, Matrix& dists2, const Vector& maxRadii, const Index k, const T epsilon, const unsigned optionFlags) const + unsigned long BruteForceSearch::knn(const Matrix& query, IndexMatrix& indices, Matrix& dists2, const Vector& maxRadii, const Index k, const T /*epsilon*/, const unsigned optionFlags) const { checkSizesKnn(query, indices, dists2, k, optionFlags, &maxRadii); diff --git a/tests/knnbench.cpp b/tests/knnbench.cpp index 29e8ea2..b8a8c75 100644 --- a/tests/knnbench.cpp +++ b/tests/knnbench.cpp @@ -137,7 +137,7 @@ BenchResult doBenchType(const typename NearestNeighbourSearch::SearchType typ const typename NearestNeighbourSearch::Matrix& d, const typename NearestNeighbourSearch::Matrix& q, const int K, - const int itCount, + const int /*itCount*/, const int searchCount) { typedef NearestNeighbourSearch nnsT; From 5d311a71429c769707386dbc13d9ef796396ebcd Mon Sep 17 00:00:00 2001 From: Simon Lynen Date: Mon, 7 Sep 2015 22:27:55 -0700 Subject: [PATCH 2/3] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eea58e4..ba2125a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,7 +40,7 @@ set(DOXYFILE_LATEX false) include(UseDoxygen) # Switch on warnings and disable one python interface warning. -add_definitions(-Wall -Wextra -Wno-unused-local-typedefs -Wno-cpp -Werror) +add_definitions(-Wall -Wextra) # Boost required for any and cstdint on MSVC < 2010 find_package(Boost COMPONENTS REQUIRED) From 63c121b2f611bc7f02ba375b79c2e380f0f47191 Mon Sep 17 00:00:00 2001 From: Simon Lynen Date: Tue, 8 Sep 2015 08:35:41 -0700 Subject: [PATCH 3/3] adr comments --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ba2125a..dc92f24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,7 @@ endif(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(DOXYFILE_LATEX false) include(UseDoxygen) -# Switch on warnings and disable one python interface warning. +# Switch on warnings. add_definitions(-Wall -Wextra) # Boost required for any and cstdint on MSVC < 2010