Fix more warnings, & make TestFCOSpec() do something useful in non-debug builds

This commit is contained in:
Brian Cox 2017-03-23 23:45:20 -07:00
parent 9c38b49839
commit 911e051091
5 changed files with 7 additions and 19 deletions

View File

@ -52,7 +52,7 @@
//=========================================================================
cFCODataSourceIterImpl::cFCODataSourceIterImpl()
: mpErrorBucket(0), mFlags(0)
: mpErrorBucket(0), mParentName(), mFlags(0)
{
}

View File

@ -279,7 +279,6 @@ int cSiggenCmdLine::Init(cCmdLineParser& parser)
case HELP:
{
return 0;
break;
}
case CRC32:
{

View File

@ -231,10 +231,8 @@ bool cMailMessageUtil::ReadDate( TSTRING& strDateBuf )
#if HAVE_STRFTIME
TCHAR szDate[1024];
struct tm *tm = NULL;
time_t current_time = time(NULL);
tm = localtime ( &current_time );
struct tm* tm = localtime ( &current_time );
const TCHAR* szFormat = _T("%a, %d %b %Y %H:%M:%S %z");

View File

@ -474,14 +474,8 @@ int cNullCryptoArchive::Write(const void* pSrc, int count)
cRSAPublicKey* mpPublicKey;
cRSAPrivateKey* mpPrivateKey;
cRSAArchive::cRSAArchive()
cRSAArchive::cRSAArchive() : mAction(MA_UNSTARTED), mpArchive(0), mpPublicKey(0), mpPrivaeKey(0), mpIDEA(new cIDEA)
{
mAction = MA_UNSTARTED;
mpArchive = 0;
mpPublicKey = 0;
mpPrivateKey = 0;
mpIDEA = new cIDEA;
}
cRSAArchive::~cRSAArchive()
@ -662,12 +656,8 @@ bool cRSAArchive::EndOfFile()
// class cElGamalSigArchive
cElGamalSigArchive::cElGamalSigArchive()
: mAction(MA_UNSTARTED), mpArchive(0), mpElGamal(0), mpPublicKey(0), mpPrivateKey(0)
{
mAction = MA_UNSTARTED;
mpArchive = 0;
mpPublicKey = 0;
mpPrivateKey = 0;
mpElGamal = 0;
}
cElGamalSigArchive::~cElGamalSigArchive()

View File

@ -34,6 +34,7 @@
#include "fco/stdfco.h"
#include "fco/fcospec.h"
#include "core/debug.h"
#include "twtest/test.h"
#include <iostream>
using namespace std;
@ -43,9 +44,9 @@ void TestFCOSpec()
cout << "Begin\tTestFCOSpec" << endl;
// all it seems I can test here is that the default mask works
const iFCOSpecMask* pDefMask = iFCOSpecMask::GetDefaultMask();
ASSERT(pDefMask->GetName().compare(TSTRING(_T("Default"))) == 0);
TEST(pDefMask->GetName().compare(TSTRING(_T("Default"))) == 0);
iFCO* pf1 = (iFCO*)0xbad, *pf2 = (iFCO*)0xcab;
ASSERT( pDefMask->Accept(pf1) && pDefMask->Accept(pf2) );
TEST( pDefMask->Accept(pf1) && pDefMask->Accept(pf2) );
cout << "End\tTestFCOSpec" << endl;
return;