mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-09 20:33:39 -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
|
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
|
template<typename T> void
|
||||||
ExtractValue(T &destVal, const std::string& strVal, ValueLike vl)
|
ExtractValue(T &destVal, const std::string& strVal, ValueLike vl)
|
||||||
{
|
{
|
||||||
|
static_cast<void>(vl); // Avoid warning about unused vl
|
||||||
std::istringstream is(strVal);
|
std::istringstream is(strVal);
|
||||||
|
|
||||||
int valuesRead = 0;
|
int valuesRead = 0;
|
||||||
@ -442,6 +444,7 @@ ExtractValue(T &destVal, const std::string& strVal, ValueLike vl)
|
|||||||
template<typename T> void
|
template<typename T> void
|
||||||
ExtractValue(T &destVal, const std::string& strVal, StringLike sl)
|
ExtractValue(T &destVal, const std::string& strVal, StringLike sl)
|
||||||
{
|
{
|
||||||
|
static_cast<void>(sl); // Avoid warning about unused sl
|
||||||
destVal = strVal;
|
destVal = strVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,8 +174,9 @@ inline void DocBookOutput::usage(CmdLineInterface& _cmd )
|
|||||||
inline void DocBookOutput::failure( CmdLineInterface& _cmd,
|
inline void DocBookOutput::failure( CmdLineInterface& _cmd,
|
||||||
ArgException& e )
|
ArgException& e )
|
||||||
{
|
{
|
||||||
std::cout << e.what() << std::endl;
|
static_cast<void>(_cmd); // unused
|
||||||
throw ExitException(1);
|
std::cout << e.what() << std::endl;
|
||||||
|
throw ExitException(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void DocBookOutput::substituteSpecialChars( std::string& s,
|
inline void DocBookOutput::substituteSpecialChars( std::string& s,
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// -*- Mode: c++; c-basic-offset: 4; tab-width: 4; -*-
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
*
|
*
|
||||||
* file: ZshCompletionOutput.h
|
* file: ZshCompletionOutput.h
|
||||||
@ -125,6 +127,7 @@ inline void ZshCompletionOutput::usage(CmdLineInterface& _cmd )
|
|||||||
inline void ZshCompletionOutput::failure( CmdLineInterface& _cmd,
|
inline void ZshCompletionOutput::failure( CmdLineInterface& _cmd,
|
||||||
ArgException& e )
|
ArgException& e )
|
||||||
{
|
{
|
||||||
|
static_cast<void>(_cmd); // unused
|
||||||
std::cout << e.what() << std::endl;
|
std::cout << e.what() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user