From 25883fc8ea9b44892f4768c7f5112f3fdcaef9bc 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 8b4317c2..9c3a767f 100644 --- a/examples/select.cpp +++ b/examples/select.cpp @@ -110,7 +110,7 @@ int main() .from(p.join(x).on(p.feature == x.cheesecake)) .where(true))) { - int id = row.id; + int64_t id = row.id; std::string name = row.name; std::string x_name = row.x.name; int cheesecake = row.x.cheesecake;