From b9ae4cd5281305f8c0dbb69086fb7126d48f567f Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 30 Jul 2010 16:25:58 +0000 Subject: [PATCH] Make warnings more strict and fix one warning caught by gcc --- CMakeLists.txt | 14 +++++++++----- include/chaiscript/dispatchkit/bootstrap_stl.hpp | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a71f41c5..1d5dc8f5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,11 +47,15 @@ else(READLINE_LIBRARY) SET (READLINE_FLAG ) endif(READLINE_LIBRARY) -#SET (CMAKE_C_FLAGS_REL " -Wall -O3 ${READLINE_FLAG}") -#SET (CMAKE_CXX_FLAGS_REL " -Wall -O3 ${READLINE_FLAG}") - -#SET (CMAKE_C_FLAGS " -Wall -ggdb ${READLINE_FLAG}") -#SET (CMAKE_CXX_FLAGS " -Wall -ggdb ${READLINE_FLAG}") +IF(MSVC) + IF (CMAKE_BUILD_TYPE MATCHES "Debug") + ADD_DEFINITIONS(/W4 /Wall) + ELSE() + ADD_DEFINITIONS(/W3) + ENDIF() +ELSE() + ADD_DEFINITIONS(-Wall -Wextra) +ENDIF() include_directories(include) diff --git a/include/chaiscript/dispatchkit/bootstrap_stl.hpp b/include/chaiscript/dispatchkit/bootstrap_stl.hpp index 622f85d2..1c3b4ce1 100644 --- a/include/chaiscript/dispatchkit/bootstrap_stl.hpp +++ b/include/chaiscript/dispatchkit/bootstrap_stl.hpp @@ -264,7 +264,7 @@ namespace chaiscript *http://www.sgi.com/tech/stl/FrontInsertionSequence.html */ template - ModulePtr front_insertion_sequence_type(const std::string &type, ModulePtr m = ModulePtr(new Module())) + ModulePtr front_insertion_sequence_type(const std::string &, ModulePtr m = ModulePtr(new Module())) { typedef typename ContainerType::reference (ContainerType::*frontptr)(); m->add(fun(static_cast(&ContainerType::front)), "front");