HomePhabricator

Fix unused variable warning when building with wallet disabled

Description

Fix unused variable warning when building with wallet disabled

Summary:
See test plan for build steps.
Before patch with BUILD_BITCOIN_WALLET=OFF:

[339/345] Building CXX object src/qt/CMakeFiles/bitcoin-qt-base.dir/rpcconsole.cpp.o
../src/qt/rpcconsole.cpp:1055:22: warning: unused variable 'wallet_model' [-Wunused-variable]
        WalletModel *wallet_model{nullptr};
                             ^
1 warning generated.

After patch: no warning present

This is a small deviation from Core, but even their latest code does not deviate in its use of wallet_model
in this function. The maintenance overhead should be minimal.

Test Plan:

cmake -GNinja -DBUILD_BITCOIN_WALLET=OFF ..
ninja

# for sanity:
cmake -GNinja -DBUILD_BITCOIN_WALLET=ON ..
ninja

Reviewers: #bitcoin_abc, deadalnix, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D4661

Details

Provenance
jasonbcoxAuthored on Dec 5 2019, 22:57
jasonbcoxPushed on Dec 6 2019, 23:06
Reviewer
Restricted Project
Differential Revision
D4661: Fix unused variable warning when building with wallet disabled
Parents
rABCcf8a94851f12: Bump version to 0.20.9
Branches
Unknown
Tags
Unknown