diff --git a/examples/Makefile.am b/examples/Makefile.am index 1f559be..381fdb7 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -17,4 +17,4 @@ test12_SOURCES = test12.cpp INCLUDES = -I$(top_srcdir)/include -AM_CXXFLAGS = -Wall +AM_CXXFLAGS = -Wall -Wextra diff --git a/include/tclap/Arg.h b/include/tclap/Arg.h index 4223917..4cdda56 100644 --- a/include/tclap/Arg.h +++ b/include/tclap/Arg.h @@ -1,3 +1,4 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- /****************************************************************************** * @@ -410,6 +411,7 @@ struct ArgTraits { template void ExtractValue(T &destVal, const std::string& strVal, ValueLike vl) { + static_cast(vl); // Avoid warning about unused vl std::istringstream is(strVal); int valuesRead = 0; @@ -442,6 +444,7 @@ ExtractValue(T &destVal, const std::string& strVal, ValueLike vl) template void ExtractValue(T &destVal, const std::string& strVal, StringLike sl) { + static_cast(sl); // Avoid warning about unused sl destVal = strVal; } diff --git a/include/tclap/DocBookOutput.h b/include/tclap/DocBookOutput.h index 86f8090..d2f1290 100644 --- a/include/tclap/DocBookOutput.h +++ b/include/tclap/DocBookOutput.h @@ -174,8 +174,9 @@ inline void DocBookOutput::usage(CmdLineInterface& _cmd ) inline void DocBookOutput::failure( CmdLineInterface& _cmd, ArgException& e ) { - std::cout << e.what() << std::endl; - throw ExitException(1); + static_cast(_cmd); // unused + std::cout << e.what() << std::endl; + throw ExitException(1); } inline void DocBookOutput::substituteSpecialChars( std::string& s, diff --git a/include/tclap/ZshCompletionOutput.h b/include/tclap/ZshCompletionOutput.h index 2aaff04..1ed4381 100644 --- a/include/tclap/ZshCompletionOutput.h +++ b/include/tclap/ZshCompletionOutput.h @@ -1,3 +1,5 @@ +// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*- + /****************************************************************************** * * file: ZshCompletionOutput.h @@ -125,6 +127,7 @@ inline void ZshCompletionOutput::usage(CmdLineInterface& _cmd ) inline void ZshCompletionOutput::failure( CmdLineInterface& _cmd, ArgException& e ) { + static_cast(_cmd); // unused std::cout << e.what() << std::endl; }