fix debug builds

This commit is contained in:
brc0x1 2019-09-04 07:35:14 +00:00
parent a9443df76d
commit 01ee6bcd85
6 changed files with 8 additions and 8 deletions

View File

@ -45,7 +45,7 @@
#include <cstdio> #include <cstdio>
int cDebug::mDebugLevel(10); int cDebug::mDebugLevel(10);
uint32 cDebug::mOutMask(cDebug::OUT_TRACE); uint32_t cDebug::mOutMask(cDebug::OUT_TRACE);
std::ofstream cDebug::logfile; std::ofstream cDebug::logfile;
//mDebugLevel default == 10, mOutMask default == OUT_TRACE. //mDebugLevel default == 10, mOutMask default == OUT_TRACE.

View File

@ -147,7 +147,7 @@ private:
}; };
static int mDebugLevel; static int mDebugLevel;
static uint32 mOutMask; static uint32_t mOutMask;
static std::ofstream logfile; static std::ofstream logfile;
char mLabel[MAX_LABEL]; char mLabel[MAX_LABEL];

View File

@ -103,7 +103,7 @@ void cErrorReporter::PrintErrorMsg(const eError& error, const TSTRING& strExtra)
errStr.erase(firstLF); errStr.erase(firstLF);
} }
ASSERT(errStr.length() + len + 6 < 80); // line too big for terminal? ASSERT(errStr.length() + 6 < 80); // line too big for terminal?
// Add 6 to account for "### ' and ': ' // Add 6 to account for "### ' and ': '
TCERR << TSS_GetString(cCore, core::STR_ERROR_COLON) << _T(" ") << errStr; TCERR << TSS_GetString(cCore, core::STR_ERROR_COLON) << _T(" ") << errStr;
TCERR << std::endl; TCERR << std::endl;

View File

@ -62,7 +62,7 @@ static uint32_t util_GetCRC(const cType& type)
const uint8_t* pszType = (const uint8_t*)(type.AsString()); const uint8_t* pszType = (const uint8_t*)(type.AsString());
int nBytes = ::strlen((const char*)pszType); int nBytes = ::strlen((const char*)pszType);
ASSERT(sizeof(uint8_t) == sizeof(byte)); //ASSERT(sizeof(uint8_t) == sizeof(byte));
ASSERT(pszType && *pszType); ASSERT(pszType && *pszType);
// //

View File

@ -184,8 +184,8 @@ template<int SIZE> inline cBlockImpl<SIZE>::cBlockImpl() : cBlock<SIZE>(), mTime
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
template<int SIZE> inline void cBlockImpl<SIZE>::Write(cBidirArchive& arch) //throw( eArchive ) template<int SIZE> inline void cBlockImpl<SIZE>::Write(cBidirArchive& arch) //throw( eArchive )
{ {
ASSERT(mbDirty); ASSERT(cBlock<SIZE>::mbDirty);
ASSERT((mBlockNum >= 0) && (((mBlockNum + 1) * SIZE) <= arch.Length())); ASSERT((cBlock<SIZE>::mBlockNum >= 0) && (((cBlock<SIZE>::mBlockNum + 1) * SIZE) <= arch.Length()));
arch.Seek((cBlock<SIZE>::mBlockNum * SIZE), cBidirArchive::BEGINNING); arch.Seek((cBlock<SIZE>::mBlockNum * SIZE), cBidirArchive::BEGINNING);
arch.WriteBlob(cBlock<SIZE>::mpData, SIZE); arch.WriteBlob(cBlock<SIZE>::mpData, SIZE);
@ -201,7 +201,7 @@ template<int SIZE> inline void cBlockImpl<SIZE>::Read(cBidirArchive& arch, int b
if (blockNum != INVALID_NUM) if (blockNum != INVALID_NUM)
cBlock<SIZE>::mBlockNum = blockNum; cBlock<SIZE>::mBlockNum = blockNum;
ASSERT((mBlockNum >= 0) && (((mBlockNum + 1) * SIZE) <= arch.Length())); ASSERT((cBlock<SIZE>::mBlockNum >= 0) && (((cBlock<SIZE>::mBlockNum + 1) * SIZE) <= arch.Length()));
// std::cout << "cBlockImpl<SIZE>::Read() mBlockNum = " << mBlockNum << " arch.Length() = " << arch.Length() << std::endl; // std::cout << "cBlockImpl<SIZE>::Read() mBlockNum = " << mBlockNum << " arch.Length() = " << arch.Length() << std::endl;

View File

@ -211,7 +211,7 @@ void cTWInit::Init(const TSTRING& strArgv0)
// should call this function (cTWInit::Init) on startup // should call this function (cTWInit::Init) on startup
// we require 8-bit bytes for some functionality // we require 8-bit bytes for some functionality
ASSERT(sizeof(byte) == sizeof(uint8_t)); //ASSERT(sizeof(byte) == sizeof(uint8_t));
// //
// set debug level // set debug level