mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Fix most compilation warnings for gcc, clang, release, debug.
This commit is contained in:
committed by
Nik Bougalis
parent
b651e0146d
commit
0f71b4a378
@@ -1045,7 +1045,7 @@ void LedgerEntrySet::incrementOwnerCount (SLE::ref sleAccount)
|
|||||||
|
|
||||||
void LedgerEntrySet::incrementOwnerCount (Account const& owner)
|
void LedgerEntrySet::incrementOwnerCount (Account const& owner)
|
||||||
{
|
{
|
||||||
incrementOwnerCount(entryCache (ltACCOUNT_ROOT,
|
incrementOwnerCount(entryCache (ltACCOUNT_ROOT,
|
||||||
Ledger::getAccountRootIndex (owner)));
|
Ledger::getAccountRootIndex (owner)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1069,7 +1069,7 @@ void LedgerEntrySet::decrementOwnerCount (SLE::ref sleAccount)
|
|||||||
|
|
||||||
void LedgerEntrySet::decrementOwnerCount (Account const& owner)
|
void LedgerEntrySet::decrementOwnerCount (Account const& owner)
|
||||||
{
|
{
|
||||||
decrementOwnerCount(entryCache (ltACCOUNT_ROOT,
|
decrementOwnerCount(entryCache (ltACCOUNT_ROOT,
|
||||||
Ledger::getAccountRootIndex (owner)));
|
Ledger::getAccountRootIndex (owner)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1440,6 +1440,7 @@ TER LedgerEntrySet::rippleCredit (
|
|||||||
// Make sure issuer is involved.
|
// Make sure issuer is involved.
|
||||||
assert (
|
assert (
|
||||||
!bCheckIssuer || uSenderID == issuer || uReceiverID == issuer);
|
!bCheckIssuer || uSenderID == issuer || uReceiverID == issuer);
|
||||||
|
(void) issuer;
|
||||||
|
|
||||||
// Disallow sending to self.
|
// Disallow sending to self.
|
||||||
assert (uSenderID != uReceiverID);
|
assert (uSenderID != uReceiverID);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace path {
|
|||||||
|
|
||||||
TER PathCursor::liquidity (LedgerEntrySet const& lesCheckpoint) const
|
TER PathCursor::liquidity (LedgerEntrySet const& lesCheckpoint) const
|
||||||
{
|
{
|
||||||
TER resultCode;
|
TER resultCode = tecPATH_DRY;
|
||||||
PathCursor pc = *this;
|
PathCursor pc = *this;
|
||||||
|
|
||||||
ledger() = lesCheckpoint.duplicate ();
|
ledger() = lesCheckpoint.duplicate ();
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ void add_random_items (std::size_t n, Table& t, beast::Random& r)
|
|||||||
make_random_item (r));
|
make_random_item (r));
|
||||||
auto const result (t.addItem (*item, false, false));
|
auto const result (t.addItem (*item, false, false));
|
||||||
assert (result);
|
assert (result);
|
||||||
|
(void) result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ public:
|
|||||||
std::make_shared < WSConnectionType <endpoint_type> > (std::ref(m_resourceManager),
|
std::make_shared < WSConnectionType <endpoint_type> > (std::ref(m_resourceManager),
|
||||||
std::ref (m_source), std::ref(*this), std::cref(cpClient))));
|
std::ref (m_source), std::ref(*this), std::cref(cpClient))));
|
||||||
assert (result.second);
|
assert (result.second);
|
||||||
|
(void) result.second;
|
||||||
WriteLog (lsDEBUG, WSServerHandlerLog) <<
|
WriteLog (lsDEBUG, WSServerHandlerLog) <<
|
||||||
"Ws:: on_open(" << cpClient->get_socket ().remote_endpoint ().to_string () << ")";
|
"Ws:: on_open(" << cpClient->get_socket ().remote_endpoint ().to_string () << ")";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public:
|
|||||||
|
|
||||||
JobTypes ()
|
JobTypes ()
|
||||||
: m_unknown (jtINVALID, "invalid", 0, true, true, 0, 0)
|
: m_unknown (jtINVALID, "invalid", 0, true, true, 0, 0)
|
||||||
{
|
{
|
||||||
int maxLimit = std::numeric_limits <int>::max ();
|
int maxLimit = std::numeric_limits <int>::max ();
|
||||||
|
|
||||||
// Make a fetch pack for a peer
|
// Make a fetch pack for a peer
|
||||||
@@ -209,18 +209,19 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void add(JobType jt, std::string name, int limit,
|
void add(JobType jt, std::string name, int limit,
|
||||||
bool skip, bool special, std::uint64_t avgLatency, std::uint64_t peakLatency)
|
bool skip, bool special, std::uint64_t avgLatency, std::uint64_t peakLatency)
|
||||||
{
|
{
|
||||||
assert (m_map.find (jt) == m_map.end ());
|
assert (m_map.find (jt) == m_map.end ());
|
||||||
|
|
||||||
std::pair<Map::iterator,bool> result (m_map.emplace (
|
std::pair<Map::iterator,bool> result (m_map.emplace (
|
||||||
std::piecewise_construct,
|
std::piecewise_construct,
|
||||||
std::forward_as_tuple (jt),
|
std::forward_as_tuple (jt),
|
||||||
std::forward_as_tuple (jt, name, limit, skip, special,
|
std::forward_as_tuple (jt, name, limit, skip, special,
|
||||||
avgLatency, peakLatency)));
|
avgLatency, peakLatency)));
|
||||||
|
|
||||||
assert (result.second == true);
|
assert (result.second == true);
|
||||||
|
(void) result.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
JobTypeInfo m_unknown;
|
JobTypeInfo m_unknown;
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ public:
|
|||||||
std::forward_as_tuple (jt.type ()),
|
std::forward_as_tuple (jt.type ()),
|
||||||
std::forward_as_tuple (jt, m_collector)));
|
std::forward_as_tuple (jt, m_collector)));
|
||||||
assert (result.second == true);
|
assert (result.second == true);
|
||||||
|
(void) result.second;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,9 +269,9 @@ ServerImpl::on_update ()
|
|||||||
for (Ports::const_iterator port (ports.begin());
|
for (Ports::const_iterator port (ports.begin());
|
||||||
port != ports.end(); ++port)
|
port != ports.end(); ++port)
|
||||||
{
|
{
|
||||||
int comp;
|
int comp = 0;
|
||||||
|
|
||||||
while (door != m_doors.end() &&
|
while (door != m_doors.end() &&
|
||||||
((comp = compare (*port, (*door)->port())) > 0))
|
((comp = compare (*port, (*door)->port())) > 0))
|
||||||
{
|
{
|
||||||
(*door)->cancel();
|
(*door)->cancel();
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ OverlayImpl::accept (bool proxyHandshake, socket_type&& socket)
|
|||||||
std::pair <PeersBySlot::iterator, bool> const result (
|
std::pair <PeersBySlot::iterator, bool> const result (
|
||||||
m_peers.emplace (slot, peer));
|
m_peers.emplace (slot, peer));
|
||||||
assert (result.second);
|
assert (result.second);
|
||||||
|
(void) result.second;
|
||||||
}
|
}
|
||||||
++m_child_count;
|
++m_child_count;
|
||||||
|
|
||||||
@@ -166,6 +167,7 @@ OverlayImpl::connect (beast::IP::Endpoint const& remote_endpoint)
|
|||||||
std::pair <PeersBySlot::iterator, bool> const result (
|
std::pair <PeersBySlot::iterator, bool> const result (
|
||||||
m_peers.emplace (slot, peer));
|
m_peers.emplace (slot, peer));
|
||||||
assert (result.second);
|
assert (result.second);
|
||||||
|
(void) result.second;
|
||||||
}
|
}
|
||||||
++m_child_count;
|
++m_child_count;
|
||||||
|
|
||||||
@@ -476,6 +478,7 @@ OverlayImpl::onPeerActivated (Peer::ptr const& peer)
|
|||||||
std::make_tuple (peer->getShortId()),
|
std::make_tuple (peer->getShortId()),
|
||||||
std::make_tuple (peer)));
|
std::make_tuple (peer)));
|
||||||
assert(result.second);
|
assert(result.second);
|
||||||
|
(void) result.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -484,6 +487,7 @@ OverlayImpl::onPeerActivated (Peer::ptr const& peer)
|
|||||||
std::make_tuple (peer->getNodePublic()),
|
std::make_tuple (peer->getNodePublic()),
|
||||||
std::make_tuple (peer)));
|
std::make_tuple (peer)));
|
||||||
assert(result.second);
|
assert(result.second);
|
||||||
|
(void) result.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_journal.debug <<
|
m_journal.debug <<
|
||||||
|
|||||||
@@ -454,6 +454,7 @@ public:
|
|||||||
state->keys.insert (key));
|
state->keys.insert (key));
|
||||||
// Public key must not already exist
|
// Public key must not already exist
|
||||||
assert (result.second);
|
assert (result.second);
|
||||||
|
(void) result.second;
|
||||||
|
|
||||||
// Change state and update counts
|
// Change state and update counts
|
||||||
state->counts.remove (*slot);
|
state->counts.remove (*slot);
|
||||||
|
|||||||
Reference in New Issue
Block a user