make all compiling with wextra

see #17
This commit is contained in:
Shane Grant
2013-12-20 11:51:45 -08:00
parent 59f066f974
commit cc9c4ac2b2
8 changed files with 19 additions and 12 deletions

View File

@@ -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++ CXX=g++
COVERAGE_OUTPUT=out COVERAGE_OUTPUT=out

View File

@@ -508,7 +508,7 @@ namespace cereal
" ar & a\n" " ar & a\n"
" return new T(a);\n" " return new T(a);\n"
"}\n\n" ); "}\n\n" );
static T * load_andor_allocate( A & ar ) static T * load_andor_allocate( A & )
{ return new T(); } { return new T(); }
}; };

View File

@@ -35,7 +35,7 @@ namespace rapidjson {
} }
// Not implemented // Not implemented
void Put(Ch c) { RAPIDJSON_ASSERT(false); } void Put(Ch) { RAPIDJSON_ASSERT(false); }
void Flush() { RAPIDJSON_ASSERT(false); } void Flush() { RAPIDJSON_ASSERT(false); }
Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; }
size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; }

View File

@@ -418,7 +418,7 @@ private:
#else #else
template<class Ch> template<class Ch>
typename std::enable_if < std::numeric_limits<Ch>::max() < 265, bool>::type typename std::enable_if < std::numeric_limits<Ch>::max() < 265, bool>::type
characterOk( Ch c ) characterOk( Ch )
{ {
return true; return true;
} }

View File

@@ -193,7 +193,7 @@ protected:
#else #else
template<class Ch> template<class Ch>
typename std::enable_if < std::numeric_limits<Ch>::max() < 265, bool>::type typename std::enable_if < std::numeric_limits<Ch>::max() < 265, bool>::type
characterOk( Ch c ) characterOk( Ch )
{ {
return true; return true;
} }

View File

@@ -116,7 +116,7 @@ namespace rapidxml
// Print attributes of the node // Print attributes of the node
template<class OutIt, class Ch> template<class OutIt, class Ch>
inline OutIt print_attributes(OutIt out, const xml_node<Ch> *node, int flags) inline OutIt print_attributes(OutIt out, const xml_node<Ch> *node, int /*flags*/)
{ {
for (xml_attribute<Ch> *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute()) for (xml_attribute<Ch> *attribute = node->first_attribute(); attribute; attribute = attribute->next_attribute())
{ {

View File

@@ -148,7 +148,14 @@ void test( std::string const & name,
DataTCereal const & dataC, DataTCereal const & dataC,
DataTBoost const & dataB, DataTBoost const & dataB,
size_t numAverages = 100, size_t numAverages = 100,
bool validateData = false ) bool validateData = false );
template <class SerializationT, class DataTCereal, class DataTBoost>
void test( std::string const & name,
DataTCereal const & dataC,
DataTBoost const & dataB,
size_t numAverages,
bool /*validateData*/ )
{ {
std::cout << "-----------------------------------" << std::endl; std::cout << "-----------------------------------" << std::endl;
std::cout << "Running test: " << name << std::endl; std::cout << "Running test: " << name << std::endl;
@@ -293,7 +300,7 @@ struct PoDStructBoost
double d; double d;
template <class Archive> template <class Archive>
void serialize( Archive & ar, const unsigned int version ) void serialize( Archive & ar, const unsigned int /*version*/ )
{ {
ar & a & b & c & d; ar & a & b & c & d;
}; };
@@ -321,7 +328,7 @@ struct PoDChildBoost : virtual PoDStructBoost
std::vector<float> v; std::vector<float> v;
template <class Archive> template <class Archive>
void serialize( Archive & ar, const unsigned int version ) void serialize( Archive & ar, const unsigned int /*version*/ )
{ {
ar & boost::serialization::base_object<PoDStructBoost>(*this); ar & boost::serialization::base_object<PoDStructBoost>(*this);
ar & v; ar & v;

View File

@@ -394,7 +394,7 @@ class BoostTransitionMS
int x; int x;
template <class Archive> template <class Archive>
void serialize( Archive & ar, const std::uint32_t version ) void serialize( Archive & ar, const std::uint32_t /*version*/ )
{ ar( x ); } { ar( x ); }
}; };
@@ -412,11 +412,11 @@ class BoostTransitionSplit
int x; int x;
template <class Archive> template <class Archive>
void save( Archive & ar, const std::uint32_t version ) const void save( Archive & ar, const std::uint32_t /*version*/ ) const
{ ar( x ); } { ar( x ); }
template <class Archive> template <class Archive>
void load( Archive & ar, const std::uint32_t version ) void load( Archive & ar, const std::uint32_t /*version*/ )
{ ar( x ); } { ar( x ); }
}; };