diff options
author | MarcoFalke <falke.marco@gmail.com> | 2022-01-13 15:57:25 +0100 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2022-01-13 15:56:59 +0100 |
commit | fa99e108e778b5169b3de2ce557af68f1fe0ac0b (patch) | |
tree | e1913507df02452f2ba27f9325f6780f85b9a25f /src/arith_uint256.cpp | |
parent | 290ff5ef6d3886409e5e8688f7d28a4c8246c617 (diff) |
Fix implicit-integer-sign-change in arith_uint256
Diffstat (limited to 'src/arith_uint256.cpp')
-rw-r--r-- | src/arith_uint256.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arith_uint256.cpp b/src/arith_uint256.cpp index 0bebb0cf54..f7f62dfc68 100644 --- a/src/arith_uint256.cpp +++ b/src/arith_uint256.cpp @@ -96,7 +96,7 @@ base_uint<BITS>& base_uint<BITS>::operator/=(const base_uint& b) while (shift >= 0) { if (num >= div) { num -= div; - pn[shift / 32] |= (1 << (shift & 31)); // set a bit of the result. + pn[shift / 32] |= (1U << (shift & 31)); // set a bit of the result. } div >>= 1; // shift back. shift--; @@ -236,7 +236,7 @@ uint32_t arith_uint256::GetCompact(bool fNegative) const nCompact >>= 8; nSize++; } - assert((nCompact & ~0x007fffff) == 0); + assert((nCompact & ~0x007fffffU) == 0); assert(nSize < 256); nCompact |= nSize << 24; nCompact |= (fNegative && (nCompact & 0x007fffff) ? 0x00800000 : 0); |