diff --git a/Makefile b/Makefile index 19894b6e..ca0952be 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CPPFLAGS=-std=c++11 -I./include -Wall -Werror -g +CPPFLAGS=-std=c++11 -I./include -Wall -Werror -g -Wextra CXX=g++ COVERAGE_OUTPUT=out diff --git a/include/cereal/details/traits.hpp b/include/cereal/details/traits.hpp index ccf3cc58..7512be53 100644 --- a/include/cereal/details/traits.hpp +++ b/include/cereal/details/traits.hpp @@ -508,7 +508,7 @@ namespace cereal " ar & a\n" " return new T(a);\n" "}\n\n" ); - static T * load_andor_allocate( A & ar ) + static T * load_andor_allocate( A & ) { return new T(); } }; diff --git a/include/cereal/external/rapidjson/genericstream.h b/include/cereal/external/rapidjson/genericstream.h index 5cfab31f..0b283194 100644 --- a/include/cereal/external/rapidjson/genericstream.h +++ b/include/cereal/external/rapidjson/genericstream.h @@ -35,7 +35,7 @@ namespace rapidjson { } // Not implemented - void Put(Ch c) { RAPIDJSON_ASSERT(false); } + void Put(Ch) { RAPIDJSON_ASSERT(false); } void Flush() { RAPIDJSON_ASSERT(false); } Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } diff --git a/include/cereal/external/rapidjson/reader.h b/include/cereal/external/rapidjson/reader.h index d2d95bbc..6e706c7b 100644 --- a/include/cereal/external/rapidjson/reader.h +++ b/include/cereal/external/rapidjson/reader.h @@ -418,7 +418,7 @@ private: #else template typename std::enable_if < std::numeric_limits::max() < 265, bool>::type - characterOk( Ch c ) + characterOk( Ch ) { return true; } diff --git a/include/cereal/external/rapidjson/writer.h b/include/cereal/external/rapidjson/writer.h index 17a89c90..1a1e7b30 100644 --- a/include/cereal/external/rapidjson/writer.h +++ b/include/cereal/external/rapidjson/writer.h @@ -193,7 +193,7 @@ protected: #else template typename std::enable_if < std::numeric_limits::max() < 265, bool>::type - characterOk( Ch c ) + characterOk( Ch ) { return true; } diff --git a/include/cereal/external/rapidxml/rapidxml_print.hpp b/include/cereal/external/rapidxml/rapidxml_print.hpp index ce6a320d..f890d410 100644 --- a/include/cereal/external/rapidxml/rapidxml_print.hpp +++ b/include/cereal/external/rapidxml/rapidxml_print.hpp @@ -116,7 +116,7 @@ namespace rapidxml // Print attributes of the node template - inline OutIt print_attributes(OutIt out, const xml_node *node, int flags) + inline OutIt print_attributes(OutIt out, const xml_node *node, int /*flags*/) { for (xml_attribute *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) { diff --git a/performance.cpp b/performance.cpp index 8b5e10b9..30340f24 100644 --- a/performance.cpp +++ b/performance.cpp @@ -148,7 +148,14 @@ void test( std::string const & name, DataTCereal const & dataC, DataTBoost const & dataB, size_t numAverages = 100, - bool validateData = false ) + bool validateData = false ); + +template +void test( std::string const & name, + DataTCereal const & dataC, + DataTBoost const & dataB, + size_t numAverages, + bool /*validateData*/ ) { std::cout << "-----------------------------------" << std::endl; std::cout << "Running test: " << name << std::endl; @@ -293,7 +300,7 @@ struct PoDStructBoost double d; template - void serialize( Archive & ar, const unsigned int version ) + void serialize( Archive & ar, const unsigned int /*version*/ ) { ar & a & b & c & d; }; @@ -321,7 +328,7 @@ struct PoDChildBoost : virtual PoDStructBoost std::vector v; template - void serialize( Archive & ar, const unsigned int version ) + void serialize( Archive & ar, const unsigned int /*version*/ ) { ar & boost::serialization::base_object(*this); ar & v; diff --git a/sandbox.cpp b/sandbox.cpp index 92d155f8..8c9b9496 100644 --- a/sandbox.cpp +++ b/sandbox.cpp @@ -394,7 +394,7 @@ class BoostTransitionMS int x; template - void serialize( Archive & ar, const std::uint32_t version ) + void serialize( Archive & ar, const std::uint32_t /*version*/ ) { ar( x ); } }; @@ -412,11 +412,11 @@ class BoostTransitionSplit int x; template - void save( Archive & ar, const std::uint32_t version ) const + void save( Archive & ar, const std::uint32_t /*version*/ ) const { ar( x ); } template - void load( Archive & ar, const std::uint32_t version ) + void load( Archive & ar, const std::uint32_t /*version*/ ) { ar( x ); } };