From a88a146b5d263d459c95095fe1af36c368aafe17 Mon Sep 17 00:00:00 2001 From: TyRoXx Date: Wed, 4 Feb 2015 21:34:46 +0100 Subject: [PATCH] enable -Wconversion and fix a warning --- CMakeLists.txt | 1 + examples/select.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1116b7f..ded9a29d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") set(CMAKE_CXX_FLAGS "-std=c++11 -Wall ${CMAKE_CXX_FLAGS}") endif () +set(CMAKE_CXX_FLAGS "-Wconversion ${CMAKE_CXX_FLAGS}") set(include_dir "${PROJECT_SOURCE_DIR}/include") file(GLOB_RECURSE sqlpp_headers "${include_dir}/*.h") diff --git a/examples/select.cpp b/examples/select.cpp index 3bcba136..64551066 100644 --- a/examples/select.cpp +++ b/examples/select.cpp @@ -107,7 +107,7 @@ int main() .from(p.join(x).on(p.feature == x.feature)) .where(true))) { - int id = row.id; + int64_t id = row.id; std::string name = row.name; } #endif