X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fmain.cpp;h=64c988a3067b091666253011060e104c37e839cb;hb=cecf7a56ed5a5efd939b21c760c69da616306005;hp=38b3ac5f839a3ad79e5896cf97afe566cb048080;hpb=48b27ec277c70795166bc1467c36bc7e1b335a11;p=novacoin.git diff --git a/src/main.cpp b/src/main.cpp index 38b3ac5..64c988a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2974,7 +2974,7 @@ bool LoadExternalBlockFile(FILE* fileIn) unsigned char pchData[65536]; do { fseek(blkdat, nPos, SEEK_SET); - int nRead = fread(pchData, 1, sizeof(pchData), blkdat); + size_t nRead = fread(pchData, 1, sizeof(pchData), blkdat); if (nRead <= 8) { nPos = std::numeric_limits::max(); @@ -3037,7 +3037,7 @@ string GetWarnings(string strFor) strRPC = "test"; // Misc warnings like out of disk space and clock is wrong - if (strMiscWarning != "") + if (!strMiscWarning.empty()) { nPriority = 1000; strStatusBar = strMiscWarning; @@ -3362,15 +3362,15 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv) } // find last block in inv vector - unsigned int nLastBlock = std::numeric_limits::max(); - for (unsigned int nInv = 0; nInv < vInv.size(); nInv++) { + size_t nLastBlock = std::numeric_limits::max(); + for (size_t nInv = 0; nInv < vInv.size(); nInv++) { if (vInv[vInv.size() - 1 - nInv].type == MSG_BLOCK) { nLastBlock = vInv.size() - 1 - nInv; break; } } CTxDB txdb("r"); - for (unsigned int nInv = 0; nInv < vInv.size(); nInv++) + for (size_t nInv = 0; nInv < vInv.size(); nInv++) { const CInv &inv = vInv[nInv];