diff options
author | Gregory Maxwell <gmaxwell@gmail.com> | 2012-05-09 04:07:24 -0700 |
---|---|---|
committer | Gregory Maxwell <gmaxwell@gmail.com> | 2012-05-09 04:07:24 -0700 |
commit | 2e767410b83a4468bf83be9c39f99cf0325c7739 (patch) | |
tree | c7777e11f9360dc415a19a7fcb04daa1e945976b /src/main.cpp | |
parent | c164396ddc57e26dfd5308c24445a7756caa9255 (diff) | |
parent | f621326c24791be14aa61221f7e35530378b84d8 (diff) |
Merge pull request #1230 from sipa/warnings
Clean up warnings
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index b337993cc2..b0ed28aa14 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2060,7 +2060,7 @@ bool LoadExternalBlockFile(FILE* fileIn) try { CAutoFile blkdat(fileIn, SER_DISK, CLIENT_VERSION); unsigned int nPos = 0; - while (nPos != -1 && blkdat.good() && !fRequestShutdown) + while (nPos != (unsigned int)-1 && blkdat.good() && !fRequestShutdown) { unsigned char pchData[65536]; do { @@ -2068,7 +2068,7 @@ bool LoadExternalBlockFile(FILE* fileIn) int nRead = fread(pchData, 1, sizeof(pchData), blkdat); if (nRead <= 8) { - nPos = -1; + nPos = (unsigned int)-1; break; } void* nFind = memchr(pchData, pchMessageStart[0], nRead+1-sizeof(pchMessageStart)); @@ -2084,7 +2084,7 @@ bool LoadExternalBlockFile(FILE* fileIn) else nPos += sizeof(pchData) - sizeof(pchMessageStart) + 1; } while(!fRequestShutdown); - if (nPos == -1) + if (nPos == (unsigned int)-1) break; fseek(blkdat, nPos, SEEK_SET); unsigned int nSize; |