aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2012-05-09 03:48:14 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2012-05-09 03:48:30 +0200
commitf621326c24791be14aa61221f7e35530378b84d8 (patch)
tree447995abd684e0fa74804aa5df76bd14417250c3 /src/main.cpp
parent781fc2c8c0972764e61dafda6fa82b7fd2a198f2 (diff)
Clean up warnings
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters * Remove xCXXFLAGS usage in makefile.unix * Fix several recent and older sign-compare warnings
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
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;