mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-07 19:29:07 -04:00
Suppress some warnings, compile with -Wextra by default
This commit is contained in:
parent
00f07eb977
commit
b4787eb4bd
@ -17,4 +17,4 @@ test12_SOURCES = test12.cpp
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include
|
||||
|
||||
AM_CXXFLAGS = -Wall
|
||||
AM_CXXFLAGS = -Wall -Wextra
|
||||
|
@ -1,3 +1,4 @@
|
||||
// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
@ -410,6 +411,7 @@ struct ArgTraits<std::string> {
|
||||
template<typename T> void
|
||||
ExtractValue(T &destVal, const std::string& strVal, ValueLike vl)
|
||||
{
|
||||
static_cast<void>(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<typename T> void
|
||||
ExtractValue(T &destVal, const std::string& strVal, StringLike sl)
|
||||
{
|
||||
static_cast<void>(sl); // Avoid warning about unused sl
|
||||
destVal = strVal;
|
||||
}
|
||||
|
||||
|
@ -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<void>(_cmd); // unused
|
||||
std::cout << e.what() << std::endl;
|
||||
throw ExitException(1);
|
||||
}
|
||||
|
||||
inline void DocBookOutput::substituteSpecialChars( std::string& s,
|
||||
|
@ -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<void>(_cmd); // unused
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user