diff --git a/CMakeLists.txt b/CMakeLists.txt index fc40235..6bc4d75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ set(CMAKE_BUILD_TYPE Release) set(mstch_VERSION 0.2.3) if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -O3") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -O3") endif() add_subdirectory(src) diff --git a/src/visitor/get_token.hpp b/src/visitor/get_token.hpp index dd7ba70..1915569 100644 --- a/src/visitor/get_token.hpp +++ b/src/visitor/get_token.hpp @@ -15,7 +15,7 @@ class get_token: public boost::static_visitor { } template - const mstch::node& operator()(const T& t) const { + const mstch::node& operator()(const T&) const { return node; } diff --git a/src/visitor/has_token.hpp b/src/visitor/has_token.hpp index 1d15443..81c9cd3 100644 --- a/src/visitor/has_token.hpp +++ b/src/visitor/has_token.hpp @@ -12,7 +12,7 @@ class has_token: public boost::static_visitor { } template - bool operator()(const T& t) const { + bool operator()(const T&) const { return token == "."; } diff --git a/src/visitor/is_node_empty.hpp b/src/visitor/is_node_empty.hpp index 8119d4c..a0ae432 100644 --- a/src/visitor/is_node_empty.hpp +++ b/src/visitor/is_node_empty.hpp @@ -9,11 +9,11 @@ namespace mstch { class is_node_empty: public boost::static_visitor { public: template - bool operator()(const T& t) const { + bool operator()(const T&) const { return false; } - bool operator()(const std::nullptr_t& nul) const { + bool operator()(const std::nullptr_t&) const { return true; } diff --git a/src/visitor/render_node.hpp b/src/visitor/render_node.hpp index aef8027..03e9a47 100644 --- a/src/visitor/render_node.hpp +++ b/src/visitor/render_node.hpp @@ -18,7 +18,7 @@ class render_node: public boost::static_visitor { } template - std::string operator()(const T& t) const { + std::string operator()(const T&) const { return ""; } diff --git a/test/specs_lambdas.hpp b/test/specs_lambdas.hpp index 87ebd5f..6ec0d59 100644 --- a/test/specs_lambdas.hpp +++ b/test/specs_lambdas.hpp @@ -20,7 +20,7 @@ std::map specs_lambdas { {"Section - Multiple Calls", mstch::lambda{[](const std::string& txt) -> mstch::node { return "__" + txt + "__"; }}}, - {"Inverted Section", mstch::lambda{[](const std::string& txt) -> mstch::node { + {"Inverted Section", mstch::lambda{[](const std::string&) -> mstch::node { return false; }}} }; \ No newline at end of file