Fix loop index var types, fixing many minor sign comparison warnings

foo.size() typically returns an unsigned integral type; make loop variables
match those types' signedness.
This commit is contained in:
Jeff Garzik
2012-04-15 16:52:09 -04:00
committed by Luke Dashjr
parent ef2f3ddaf7
commit 774e9b6dbb
7 changed files with 38 additions and 38 deletions

View File

@@ -869,7 +869,7 @@ void ThreadSocketHandler2(void* parg)
if (hSocketMax > -1)
{
printf("socket select error %d\n", nErr);
for (int i = 0; i <= hSocketMax; i++)
for (unsigned int i = 0; i <= hSocketMax; i++)
FD_SET(i, &fdsetRecv);
}
FD_ZERO(&fdsetSend);
@@ -1252,7 +1252,7 @@ void ThreadDNSAddressSeed2(void* parg)
{
printf("Loading addresses from DNS seeds (could take a while)\n");
for (int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
for (unsigned int seed_idx = 0; seed_idx < ARRAYLEN(strDNSSeed); seed_idx++) {
vector<CAddress> vaddr;
if (Lookup(strDNSSeed[seed_idx], vaddr, NODE_NETWORK, -1, true))
{
@@ -1469,7 +1469,7 @@ void ThreadOpenConnections2(void* parg)
if (fAddSeeds)
{
for (int i = 0; i < ARRAYLEN(pnSeed); i++)
for (unsigned int i = 0; i < ARRAYLEN(pnSeed); i++)
{
// It'll only connect to one or two seed nodes because once it connects,
// it'll get a pile of addresses with newer timestamps.