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
This commit is contained in:
Pieter Wuille
2012-05-09 03:48:14 +02:00
parent 781fc2c8c0
commit f621326c24
13 changed files with 24 additions and 26 deletions

View File

@@ -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;