Page MenuHomePhabricator

Fix unused variable warning when building with wallet disabled
ClosedPublic

Authored by jasonbcox on Dec 6 2019, 20:21.

Details

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

Diff Detail

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