Fix compiler warnings under gcc.

This commit is contained in:
Tom Ritchford
2014-09-30 10:37:33 -04:00
committed by Vinnie Falco
parent 616be1d76c
commit 6069400538
5 changed files with 27 additions and 28 deletions

View File

@@ -67,10 +67,7 @@ class session::Sqlite3
public:
Sqlite3()
{
int threadSafe = sqlite3_threadsafe();
assert (threadSafe != 0);
assert (sqlite3_threadsafe() != 0);
sqlite3_initialize();
}

View File

@@ -1233,8 +1233,8 @@ private:
seedDomain sdCurrent;
bool bFound = getSeedDomains (strDomain, sdCurrent);
assert (bFound);
(void) bFound;
uint256 iSha256 = Serializer::getSHA512Half (strSiteFile);
bool bChangedB = sdCurrent.iSha256 != iSha256;
@@ -1348,8 +1348,8 @@ private:
seedDomain sdCurrent;
bool bFound = getSeedDomains (strDomain, sdCurrent);
assert (bFound);
(void) bFound;
// Update time of next fetch and this scan attempt.
sdCurrent.tpScan = tpNow;

View File

@@ -400,8 +400,8 @@ public:
auto const iter (state->slots.find (local_endpoint));
if (iter != state->slots.end ())
{
Slot::ptr const& self (iter->second);
assert (self->local_endpoint () == slot->remote_endpoint ());
assert (iter->second->local_endpoint ()
== slot->remote_endpoint ());
if (m_journal.warning) m_journal.warning << beast::leftw (18) <<
"Logic dropping " << slot->remote_endpoint () <<
" as self connect";

View File

@@ -77,7 +77,7 @@ Json::Value doAccountOffers (RPC::Context& context)
}
uint256 const rootIndex (Ledger::getOwnerDirIndex (raAccount.getAccountID ()));
std::uint32_t resumeSeq;
std::uint32_t resumeSeq = 0;
uint256 currentIndex;
bool resume (true);

View File

@@ -115,7 +115,9 @@ bool Base58::raw_decode (char const* first, char const* last, void* dest,
bnChar.setuint ((unsigned int) i);
int const success (BN_mul (&bn, &bn, &bn58, pctx));
assert (success);
(void) success;
bn += bnChar;
}