From 778b0d8816e0b05a5cb18c755e77f74b5d1f107f Mon Sep 17 00:00:00 2001 From: rbock Date: Sat, 28 Jun 2014 14:39:04 +0200 Subject: [PATCH] Added -Wall, took care of a bunch of compiler warnings --- CMakeLists.txt | 4 ++-- include/sqlpp11/column_fwd.h | 2 +- include/sqlpp11/functions.h | 2 -- include/sqlpp11/insert_value_list.h | 2 +- include/sqlpp11/named_interpretable.h | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3d8eeaf..3dd3e7ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,9 +28,9 @@ enable_testing() message(STATUS "Using ${CMAKE_CXX_COMPILER} (compiler id: ${CMAKE_CXX_COMPILER_ID})") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++ -Wall ${CMAKE_CXX_FLAGS}") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "-std=c++11 -Wall ${CMAKE_CXX_FLAGS}") endif () set(include_dir "${PROJECT_SOURCE_DIR}/include") diff --git a/include/sqlpp11/column_fwd.h b/include/sqlpp11/column_fwd.h index d378aa6a..634bbe0b 100644 --- a/include/sqlpp11/column_fwd.h +++ b/include/sqlpp11/column_fwd.h @@ -31,7 +31,7 @@ namespace sqlpp { template - class column_t; + struct column_t; } #endif diff --git a/include/sqlpp11/functions.h b/include/sqlpp11/functions.h index 058a3b48..65c05a2e 100644 --- a/include/sqlpp11/functions.h +++ b/include/sqlpp11/functions.h @@ -48,8 +48,6 @@ namespace sqlpp template auto value(T t) -> wrap_operand_t { - using _provided_tables = detail::type_set<>; - using _required_tables = ::sqlpp::detail::type_set<>; static_assert(is_wrapped_value_t>::value, "value() is to be called with non-sql-type like int, or string"); return { t }; } diff --git a/include/sqlpp11/insert_value_list.h b/include/sqlpp11/insert_value_list.h index f02d7a47..513085d5 100644 --- a/include/sqlpp11/insert_value_list.h +++ b/include/sqlpp11/insert_value_list.h @@ -96,9 +96,9 @@ namespace sqlpp insert_list_data_t& operator=(insert_list_data_t&&) = default; ~insert_list_data_t() = default; + std::tuple _assignments; // FIXME: Need to replace _columns and _values by _assignments (connector-container requires assignments) std::tuple...> _columns; std::tuple _values; - std::tuple _assignments; // FIXME: Need to replace _columns and _values by _assignments (connector-container requires assignments) interpretable_list_t _dynamic_columns; interpretable_list_t _dynamic_values; }; diff --git a/include/sqlpp11/named_interpretable.h b/include/sqlpp11/named_interpretable.h index 78af6e8c..dcbffbdb 100644 --- a/include/sqlpp11/named_interpretable.h +++ b/include/sqlpp11/named_interpretable.h @@ -71,7 +71,7 @@ namespace sqlpp std::string _get_name() const { - _impl->_get_name(); + return _impl->_get_name(); } private: