Signed values don't really make sense when using std::vector::operator[].
Fix that and remove the suppression.
Signed values don't really make sense when using std::vector::operator[].
Fix that and remove the suppression.
I get the same binary with gcc and clang on my system with -O2.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
No conflicts as of last run.
217 | @@ -218,7 +218,7 @@ void CRollingBloomFilter::insert(Span<const unsigned char> vKey) 218 | /* FastMod works with the upper bits of h, so it is safe to ignore that the lower bits of h are already used for bit. */ 219 | uint32_t pos = FastRange32(h, data.size()); 220 | /* The lowest bit of pos is ignored, and set to zero for the first bit, and to one for the second. */ 221 | - data[pos & ~1] = (data[pos & ~1] & ~(((uint64_t)1) << bit)) | ((uint64_t)(nGeneration & 1)) << bit; 222 | + data[pos & ~1U] = (data[pos & ~1U] & ~(((uint64_t)1) << bit)) | ((uint64_t)(nGeneration & 1)) << bit;
please :) (otherwise PR looks good)
data[pos & ~1U] = (data[pos & ~1U] & ~(uint64_t{1} << bit)) | (uint64_t(nGeneration & 1)) << bit;
Thx, done in a new commit
utACK fad84a25956ec081f22aebbda309d168a3dc0004
Code-review ACK fad84a25956ec081f22aebbda309d168a3dc0004
Can confirm that the compiled bitcoind binary is unchanged with clang 11.1.0 (Target amd64-unknown-openbsd7.0).