diff options
author | fanquake <fanquake@gmail.com> | 2021-11-23 17:46:23 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-11-23 17:46:59 +0800 |
commit | 4018e23aa7e7bb57d721c7c41c55dfbb659b8c34 (patch) | |
tree | d67c6075f1fab5db97e7275b990952a03ed998b2 /src/test/util_tests.cpp | |
parent | 95d19f8c1a40a7531d2bb00febd245d127293a64 (diff) | |
parent | ab22a71429f0f47b3c3582a303c07940aa59cd3e (diff) | |
download | bitcoin-4018e23aa7e7bb57d721c7c41c55dfbb659b8c34.tar.xz |
Merge bitcoin/bitcoin#23573: refactor: cast bool operands to int to silence compiler warning
ab22a71429f0f47b3c3582a303c07940aa59cd3e refactor: cast bool to int to silence compiler warning (Jon Atack)
Pull request description:
This fixes a compiler warning:
```
node/interfaces.cpp:544:16: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
return FillBlock(ancestor, ancestor_out, lock, active) & FillBlock(block1, block1_out, lock, active) & FillBlock(block2, block2_out, lock, active);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&&
node/interfaces.cpp:544:16: note: cast one or both operands to int to silence this warning
node/interfaces.cpp:544:16: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
return FillBlock(ancestor, ancestor_out, lock, active) & FillBlock(block1, block1_out, lock, active) & FillBlock(block2, block2_out, lock, active);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
&&
node/interfaces.cpp:544:16: note: cast one or both operands to int to silence this warning
2 warnings generated.
```
ACKs for top commit:
sipa:
utACK ab22a71429f0f47b3c3582a303c07940aa59cd3e
theStack:
Concept and code-review ACK ab22a71429f0f47b3c3582a303c07940aa59cd3e
shaavan:
ACK ab22a71429f0f47b3c3582a303c07940aa59cd3e
Tree-SHA512: 84e5aeabc1514a7586ac7c78a8eff1d15a5967dced7b2485b266b6fd79a530e1b22d99ded0a5df39f7806d3c5fd6d9752f08a722cc3be17850a6242c4022ab03
Diffstat (limited to 'src/test/util_tests.cpp')
0 files changed, 0 insertions, 0 deletions