Page MenuHomePhabricator

cast bool operands to int to silence compiler warning
ClosedPublic

Authored by PiRK on Dec 22 2021, 16:37.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCfcf196f63c2a: cast bool operands to int to silence compiler warning
Summary

I noticed the compiler warning while running the test plan for D10725.

../src/interfaces/chain.cpp:291:20: warning: use of bitwise '&' with boolean operands [-Wbitwise-instead-of-logical]
            return FillBlock(ancestor, ancestor_out, lock) &
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is a backport of core#23573

Test Plan
cmake .. -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
ninja all check-all

I'm using clang 14.0.0

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable