Fix some clang extended warnings: non-virtual-dtor, shadow, unneeded-internal-declaration
This commit is contained in:
parent
aaee78c061
commit
2b067176ad
|
@ -81,6 +81,8 @@ inline bool IsSingleTCHAR( TSTRING::const_iterator first,
|
||||||
class iCharEncoder
|
class iCharEncoder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~iCharEncoder() {};
|
||||||
|
|
||||||
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
||||||
TSTRING::const_iterator last ) const = 0;
|
TSTRING::const_iterator last ) const = 0;
|
||||||
// Determines if character identified by [first,last) needs encoding.
|
// Determines if character identified by [first,last) needs encoding.
|
||||||
|
@ -107,7 +109,7 @@ class iCharEncoder
|
||||||
|
|
||||||
static TCHAR EscapeChar() { return char_escape; }
|
static TCHAR EscapeChar() { return char_escape; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
static TCHAR char_escape;
|
static TCHAR char_escape;
|
||||||
};
|
};
|
||||||
|
@ -116,6 +118,8 @@ class iCharEncoder
|
||||||
class cNonNarrowableCharEncoder : public iCharEncoder
|
class cNonNarrowableCharEncoder : public iCharEncoder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~cNonNarrowableCharEncoder() {}
|
||||||
|
|
||||||
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
||||||
TSTRING::const_iterator last ) const;
|
TSTRING::const_iterator last ) const;
|
||||||
|
|
||||||
|
@ -141,7 +145,9 @@ class cNonPrintableCharEncoder : public iCharEncoder
|
||||||
cNonPrintableCharEncoder( bool f_allowWS )
|
cNonPrintableCharEncoder( bool f_allowWS )
|
||||||
: m_allowWS( f_allowWS ) {};
|
: m_allowWS( f_allowWS ) {};
|
||||||
|
|
||||||
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
virtual ~cNonPrintableCharEncoder() {}
|
||||||
|
|
||||||
|
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
||||||
TSTRING::const_iterator last ) const;
|
TSTRING::const_iterator last ) const;
|
||||||
|
|
||||||
virtual TSTRING EncodeRoundtrip(TSTRING::const_iterator first,
|
virtual TSTRING EncodeRoundtrip(TSTRING::const_iterator first,
|
||||||
|
@ -164,6 +170,8 @@ class cNonPrintableCharEncoder : public iCharEncoder
|
||||||
class cQuoteCharEncoder : public iCharEncoder
|
class cQuoteCharEncoder : public iCharEncoder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~cQuoteCharEncoder() {}
|
||||||
|
|
||||||
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
||||||
TSTRING::const_iterator last ) const;
|
TSTRING::const_iterator last ) const;
|
||||||
|
|
||||||
|
@ -187,6 +195,8 @@ class cQuoteCharEncoder : public iCharEncoder
|
||||||
class cBackslashCharEncoder : public iCharEncoder
|
class cBackslashCharEncoder : public iCharEncoder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
virtual ~cBackslashCharEncoder() {}
|
||||||
|
|
||||||
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
virtual bool NeedsEncoding( TSTRING::const_iterator first,
|
||||||
TSTRING::const_iterator last ) const;
|
TSTRING::const_iterator last ) const;
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ public:
|
||||||
enum { CHILDREN_NONE = 0,
|
enum { CHILDREN_NONE = 0,
|
||||||
CHILDREN_ALL = -1 };
|
CHILDREN_ALL = -1 };
|
||||||
|
|
||||||
|
virtual ~iFCODataSource() = 0;
|
||||||
|
|
||||||
// NOTE -- in the act of creating fcos, there are certain properties that we can obtain "for free" just
|
// NOTE -- in the act of creating fcos, there are certain properties that we can obtain "for free" just
|
||||||
// by the act of querying the system we are generating fcos for (for example, a stat() call is required
|
// by the act of querying the system we are generating fcos for (for example, a stat() call is required
|
||||||
// to create file system fcos, which also gives us many of the fsfco's property values). Therefore,
|
// to create file system fcos, which also gives us many of the fsfco's property values). Therefore,
|
||||||
|
|
|
@ -436,8 +436,8 @@ void cTextReportViewer::PrintErrors()
|
||||||
cFCOReportSpecIter rsi( genreIter );
|
cFCOReportSpecIter rsi( genreIter );
|
||||||
for( rsi.SeekBegin(); !rsi.Done(); rsi.Next() )
|
for( rsi.SeekBegin(); !rsi.Done(); rsi.Next() )
|
||||||
{
|
{
|
||||||
cErrorQueueIter eqIter( *( rsi.GetErrorQueue() ) );
|
cErrorQueueIter eqIter2( *( rsi.GetErrorQueue() ) );
|
||||||
for( eqIter.SeekBegin(); !eqIter.Done(); eqIter.Next() )
|
for( eqIter2.SeekBegin(); !eqIter2.Done(); eqIter2.Next() )
|
||||||
{
|
{
|
||||||
if( fFirstErrorInGenre )
|
if( fFirstErrorInGenre )
|
||||||
{
|
{
|
||||||
|
@ -445,7 +445,7 @@ void cTextReportViewer::PrintErrors()
|
||||||
fFirstErrorInGenre = false;
|
fFirstErrorInGenre = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportError( eqIter );
|
ReportError( eqIter2 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -325,18 +325,18 @@ bool cTWAModeCreateCfg::Init(const cConfigFile* cf, const cCmdLineParser& parser
|
||||||
}
|
}
|
||||||
|
|
||||||
// get full path to files
|
// get full path to files
|
||||||
TSTRING strFullPath;
|
TSTRING strPlaintextConfigPath;
|
||||||
if( iFSServices::GetInstance()->FullPath( strFullPath, mPlaintextConfig ) )
|
if( iFSServices::GetInstance()->FullPath( strPlaintextConfigPath, mPlaintextConfig ) )
|
||||||
mPlaintextConfig = strFullPath;
|
mPlaintextConfig = strPlaintextConfigPath;
|
||||||
|
|
||||||
// OK, now we need to figure out where to put the new config file.
|
// OK, now we need to figure out where to put the new config file.
|
||||||
// If the location was specified on the command line, get the full path to it.
|
// If the location was specified on the command line, get the full path to it.
|
||||||
// otherwise, the location is the dir that this exe is in.
|
// otherwise, the location is the dir that this exe is in.
|
||||||
if( fConfigOnCmdLine )
|
if( fConfigOnCmdLine )
|
||||||
{
|
{
|
||||||
TSTRING strFullPath;
|
TSTRING strEncryptedConfigPath;
|
||||||
if( iFSServices::GetInstance()->FullPath( strFullPath, mEncryptedConfig ) )
|
if( iFSServices::GetInstance()->FullPath( strEncryptedConfigPath, mEncryptedConfig ) )
|
||||||
mEncryptedConfig = strFullPath;
|
mEncryptedConfig = strEncryptedConfigPath;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -133,9 +133,9 @@ unsigned int cByteQueueNode::Peek(byte &outByte) const
|
||||||
// cByteQueue
|
// cByteQueue
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
cByteQueue::cByteQueue(int mNodeSize)
|
cByteQueue::cByteQueue(int nodeSize)
|
||||||
: BufferedTransformation(),
|
: BufferedTransformation(),
|
||||||
mNodeSize(mNodeSize),
|
mNodeSize(nodeSize),
|
||||||
mCurrentSize(0)
|
mCurrentSize(0)
|
||||||
{
|
{
|
||||||
head = tail = new cByteQueueNode(mNodeSize);
|
head = tail = new cByteQueueNode(mNodeSize);
|
||||||
|
|
|
@ -498,9 +498,6 @@ bool cTWPrintReportMode::Init(const cConfigFile& cf, const cCmdLineParser& cmdLi
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
int cTWPrintReportMode::Execute(cErrorQueue* pQueue)
|
int cTWPrintReportMode::Execute(cErrorQueue* pQueue)
|
||||||
{
|
{
|
||||||
cFCOReport report;
|
|
||||||
cFCOReportHeader reportHeader;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ASSERT( ! mpData->mReportFile.empty() );
|
ASSERT( ! mpData->mReportFile.empty() );
|
||||||
|
@ -510,6 +507,7 @@ int cTWPrintReportMode::Execute(cErrorQueue* pQueue)
|
||||||
cKeyFile localKeyfile;
|
cKeyFile localKeyfile;
|
||||||
const cElGamalSigPublicKey* pKey;
|
const cElGamalSigPublicKey* pKey;
|
||||||
cFCOReport report;
|
cFCOReport report;
|
||||||
|
cFCOReportHeader reportHeader;
|
||||||
|
|
||||||
cTWUtil::OpenKeyFile( localKeyfile, mpData->mLocalKeyFile );
|
cTWUtil::OpenKeyFile( localKeyfile, mpData->mLocalKeyFile );
|
||||||
pKey = localKeyfile.GetPublicKey();
|
pKey = localKeyfile.GetPublicKey();
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#include "core/error.h"
|
#include "core/error.h"
|
||||||
|
|
||||||
static void PrintDb( cHierDatabase::iterator iter, cDebug d, bool bFirst = true )
|
/*static void PrintDb( cHierDatabase::iterator iter, cDebug d, bool bFirst = true )
|
||||||
{
|
{
|
||||||
if( ! bFirst )
|
if( ! bFirst )
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ static void PrintDb( cHierDatabase::iterator iter, cDebug d, bool bFirst = true
|
||||||
}
|
}
|
||||||
|
|
||||||
d.TraceDebug( "-- Done Processing directory %s\n", iter.GetCwd().c_str() );
|
d.TraceDebug( "-- Done Processing directory %s\n", iter.GetCwd().c_str() );
|
||||||
}
|
}*/
|
||||||
|
|
||||||
static void GetNoun( TSTRING& noun )
|
static void GetNoun( TSTRING& noun )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue