Skip to content

Commit 26c93ed

Browse files
committed
Merge #13294: Fix compiler warnings emitted when compiling under stock OpenBSD 6.3
a426098 Fix compiler warnings emitted when compiling under stock OpenBSD 6.3 (practicalswift) Pull request description: Fix compiler warnings emitted when compiling under stock OpenBSD 6.3 (OpenBSD clang version 5.0.1, based on LLVM 5.0.1): ``` random.cpp:182:13: warning: unused function 'GetDevURandom' [-Wunused-function] static void GetDevURandom(unsigned char *ent32) ^ txmempool.cpp:707:45: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'long long' [-Wsign-compare] assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Tree-SHA512: da2ae86218054b10659ea694179433700ac91de8022e06007348168ed5adc3d8c4ad3b32a3fc5783a2cdf1ca7425aff586b839200dd3b226ebff72a7df15f120
2 parents 70a03c6 + a426098 commit 26c93ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/txmempool.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -693,18 +693,18 @@ void CTxMemPool::check(const CCoinsViewCache *pcoins) const
693693
// Check children against mapNextTx
694694
CTxMemPool::setEntries setChildrenCheck;
695695
auto iter = mapNextTx.lower_bound(COutPoint(it->GetTx().GetHash(), 0));
696-
int64_t childSizes = 0;
696+
uint64_t child_sizes = 0;
697697
for (; iter != mapNextTx.end() && iter->first->hash == it->GetTx().GetHash(); ++iter) {
698698
txiter childit = mapTx.find(iter->second->GetHash());
699699
assert(childit != mapTx.end()); // mapNextTx points to in-mempool transactions
700700
if (setChildrenCheck.insert(childit).second) {
701-
childSizes += childit->GetTxSize();
701+
child_sizes += childit->GetTxSize();
702702
}
703703
}
704704
assert(setChildrenCheck == GetMemPoolChildren(it));
705705
// Also check to make sure size is greater than sum with immediate children.
706706
// just a sanity check, not definitive that this calc is correct...
707-
assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize());
707+
assert(it->GetSizeWithDescendants() >= child_sizes + it->GetTxSize());
708708

709709
if (fDependsWait)
710710
waitingOnDependants.push_back(&(*it));

0 commit comments

Comments
 (0)