forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 725
Closed
Description
Hey!
The compiler warnings have MUCH improved since the last time this kind of thread has been opened, but I can still see two of them remaining.
Running Gentoo Linux Hardened 32bit, gcc version 10.3.0 (Gentoo Hardened 10.3.0 p1), glibc-2.33, glib-2.68.2-r1
CXX libbitcoin_server_a-txmempool.o
txmempool.cpp: In member function 'void CTxMemPool::removeForReorg(const CCoinsViewCache*, unsigned int, int)':
txmempool.cpp:535:130: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'const int' [-Wsign-compare]
535 | if (coin.IsSpent() || ((coin.IsCoinBase() || coin.IsCoinStake()) && ((signed long)nMemPoolHeight) - coin.nHeight < Params().GetConsensus().nCoinbaseMaturity)) {
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/boost/assert.hpp:58,
from /usr/include/boost/thread/pthread/thread_data.hpp:18,
from /usr/include/boost/thread/pthread/condition_variable.hpp:12,
from /usr/include/boost/thread/condition_variable.hpp:16,
from util.h:36,
from txmempool.cpp:14:
txmempool.cpp: In member function 'void CTxMemPool::check(const CCoinsViewCache*) const':
txmempool.cpp:756:49: warning: comparison of integer expressions of different signedness: 'uint64_t' {aka 'long long unsigned int'} and 'int64_t' {aka 'long long int'} [-Wsign-compare]
756 | assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CXX libbitcoin_server_a-validation.o
validation.cpp: In function 'bool Consensus::CheckTxInputs(const CTransaction&, CValidationState&, const CCoinsViewCache&, int)':
validation.cpp:1024:58: warning: comparison of integer expressions of different signedness: 'long unsigned int' and 'const int' [-Wsign-compare]
1024 | if ((signed long)nSpendHeight - coin.nHeight < consensus.nCoinbaseMaturity)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Metadata
Metadata
Assignees
Labels
No labels