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: public:
Sqlite3() Sqlite3()
{ {
int threadSafe = sqlite3_threadsafe(); assert (sqlite3_threadsafe() != 0);
assert (threadSafe != 0);
sqlite3_initialize(); sqlite3_initialize();
} }

View File

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

View File

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

View File

@@ -77,7 +77,7 @@ Json::Value doAccountOffers (RPC::Context& context)
} }
uint256 const rootIndex (Ledger::getOwnerDirIndex (raAccount.getAccountID ())); uint256 const rootIndex (Ledger::getOwnerDirIndex (raAccount.getAccountID ()));
std::uint32_t resumeSeq; std::uint32_t resumeSeq = 0;
uint256 currentIndex; uint256 currentIndex;
bool resume (true); 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); bnChar.setuint ((unsigned int) i);
int const success (BN_mul (&bn, &bn, &bn58, pctx)); int const success (BN_mul (&bn, &bn, &bn58, pctx));
assert (success); assert (success);
(void) success;
bn += bnChar; bn += bnChar;
} }