mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-19 14:45:08 +01:00
Avoid integer sanitizer warnings in chain.o
This commit is contained in:
parent
bd482b3ffe
commit
fa832103aa
@ -151,7 +151,7 @@ int64_t GetBlockProofEquivalentTime(const CBlockIndex& to, const CBlockIndex& fr
|
||||
if (r.bits() > 63) {
|
||||
return sign * std::numeric_limits<int64_t>::max();
|
||||
}
|
||||
return sign * r.GetLow64();
|
||||
return sign * int64_t(r.GetLow64());
|
||||
}
|
||||
|
||||
/** Find the last common ancestor two blocks have.
|
||||
|
@ -462,7 +462,7 @@ public:
|
||||
/** Return the maximal height in the chain. Is equal to chain.Tip() ? chain.Tip()->nHeight : -1. */
|
||||
int Height() const
|
||||
{
|
||||
return vChain.size() - 1;
|
||||
return int(vChain.size()) - 1;
|
||||
}
|
||||
|
||||
/** Set/initialize a chain with a given tip. */
|
||||
|
@ -47,8 +47,6 @@ unsigned-integer-overflow:addrman.cpp
|
||||
unsigned-integer-overflow:arith_uint256.h
|
||||
unsigned-integer-overflow:bitcoin-tx.cpp
|
||||
unsigned-integer-overflow:common/bloom.cpp
|
||||
unsigned-integer-overflow:chain.cpp
|
||||
unsigned-integer-overflow:chain.h
|
||||
unsigned-integer-overflow:coins.cpp
|
||||
unsigned-integer-overflow:compressor.cpp
|
||||
unsigned-integer-overflow:core_write.cpp
|
||||
@ -64,8 +62,6 @@ unsigned-integer-overflow:validation.cpp
|
||||
implicit-integer-sign-change:addrman.h
|
||||
implicit-integer-sign-change:bech32.cpp
|
||||
implicit-integer-sign-change:common/bloom.cpp
|
||||
implicit-integer-sign-change:chain.cpp
|
||||
implicit-integer-sign-change:chain.h
|
||||
implicit-integer-sign-change:coins.h
|
||||
implicit-integer-sign-change:compat/stdin.cpp
|
||||
implicit-integer-sign-change:compressor.h
|
||||
@ -80,10 +76,8 @@ implicit-integer-sign-change:serialize.h
|
||||
implicit-integer-sign-change:test/streams_tests.cpp
|
||||
implicit-integer-sign-change:txmempool.cpp
|
||||
implicit-integer-sign-change:zmq/zmqpublishnotifier.cpp
|
||||
implicit-signed-integer-truncation,implicit-integer-sign-change:chain.h
|
||||
implicit-signed-integer-truncation:addrman.cpp
|
||||
implicit-signed-integer-truncation:addrman.h
|
||||
implicit-signed-integer-truncation:chain.h
|
||||
implicit-signed-integer-truncation:crypto/
|
||||
implicit-signed-integer-truncation:node/miner.cpp
|
||||
implicit-signed-integer-truncation:net.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user