fix warnings: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]

This commit is contained in:
Wladimir J. van der Laan
2012-04-15 13:27:00 +02:00
committed by Luke Dashjr
parent 9c236a945c
commit 1bdfa94a01
6 changed files with 18 additions and 0 deletions

View File

@@ -647,6 +647,7 @@ bool CTxDB::LoadBlockIndex()
// check level 4: check whether spent txouts were spent within the main chain
int nOutput = 0;
if (nCheckLevel>3)
{
BOOST_FOREACH(const CDiskTxPos &txpos, txindex.vSpent)
{
if (!txpos.IsNull())
@@ -687,9 +688,11 @@ bool CTxDB::LoadBlockIndex()
}
nOutput++;
}
}
}
// check level 5: check whether all prevouts are marked spent
if (nCheckLevel>4)
{
BOOST_FOREACH(const CTxIn &txin, tx.vin)
{
CTxIndex txindex;
@@ -700,6 +703,7 @@ bool CTxDB::LoadBlockIndex()
pindexFork = pindex->pprev;
}
}
}
}
}
}