Page MenuHomePhabricator

Constructors, destructors, and relevant private fields for SQLiteDatabase/Batch
ClosedPublic

Authored by PiRK on Thu, Nov 25, 13:50.

Details

Summary

This is a backport of core#19077 [5/26]
https://github.com/bitcoin/bitcoin/pull/19077/commits/5a488b3d77326a0d957c1233493061da1b6ec207

Depends on D10543

note: unused member SQLiteBatch::m_database commented out to avoid compiler warnings.

Test Plan

With clang-tidy:
ninja

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Thu, Nov 25, 13:51

Tail of the build log:

[347/511] Linking C executable src/secp256k1/sign-bench
[348/511] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[349/511] Linking C executable src/secp256k1/verify-bench
[350/511] Building CXX object src/CMakeFiles/bitcoin-wallet.dir/bitcoin-wallet.cpp.o
[351/511] Installing component secp256k1
-- Install configuration: "Debug"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[352/511] Linking C executable src/secp256k1/recover-bench
[353/511] Linking CXX static library src/libscript.a
[354/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[355/511] Linking CXX static library src/libcommon.a
[356/511] Linking CXX shared library src/libbitcoinconsensus.so.0.24.7
[357/511] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[358/511] Linking CXX executable src/bitcoin-cli
[359/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[360/511] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[361/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[362/511] Linking CXX executable src/bitcoin-tx
[363/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[364/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[365/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[366/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[367/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[368/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[369/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[370/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DABORT_ON_FAILED_ASSUME -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DDEBUG -DDEBUG_LOCKORDER -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -isystem /usr/include/jemalloc -Werror -O0 -fPIC -fvisibility=hidden -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o -c ../../src/wallet/sqlite.cpp
In file included from ../../src/wallet/sqlite.cpp:5:
../../src/./wallet/sqlite.h:18:38: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
     [[maybe_unused]] SQLiteDatabase &m_database;
                                      ^~~~~~~~~~
../../src/./wallet/sqlite.h:47:45: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
     [[maybe_unused]] const bool m_mock{false};
                                             ^
cc1plus: all warnings being treated as errors
[371/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[372/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[373/511] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[374/511] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[375/511] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[376/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[377/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[378/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[379/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[380/511] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[381/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[382/511] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[383/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[384/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[385/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[386/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[387/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

[347/511] Linking C executable src/secp256k1/sign-bench
[348/511] Linking C executable src/secp256k1/verify-bench
[349/511] Linking C executable src/secp256k1/recover-bench
[350/511] Installing component secp256k1
-- Install configuration: "RelWithDebInfo"
-- Install component: "secp256k1"
-- Installing: /results/artifacts/lib/libsecp256k1.a
-- Installing: /results/artifacts/include/secp256k1.h
-- Installing: /results/artifacts/include/secp256k1_preallocated.h
-- Installing: /results/artifacts/include/secp256k1_recovery.h
-- Installing: /results/artifacts/include/secp256k1_schnorr.h
[351/511] Building CXX object src/CMakeFiles/script.dir/script/descriptor.cpp.o
[352/511] Linking CXX static library src/libscript.a
[353/511] Linking CXX static library src/libcommon.a
[354/511] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[355/511] Linking CXX shared library src/libbitcoinconsensus.so.0.24.7
[356/511] Creating library symlink src/libbitcoinconsensus.so.0 src/libbitcoinconsensus.so
[357/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[358/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[359/511] Linking CXX executable src/bitcoin-cli
[360/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[361/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[362/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[363/511] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[364/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[365/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[366/511] Linking CXX executable src/bitcoin-tx
[367/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[368/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[369/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[370/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[371/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DBOOST_AC_USE_STD_ATOMIC -DBOOST_SP_USE_STD_ATOMIC -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -isystem /usr/include/jemalloc -Werror -g -O2 -fPIC -fvisibility=hidden -fstack-reuse=none -fstack-protector-all -Wstack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -pthread -std=gnu++17 -MD -MT src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o -c ../../src/wallet/sqlite.cpp
In file included from ../../src/wallet/sqlite.cpp:5:
../../src/./wallet/sqlite.h:18:38: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
     [[maybe_unused]] SQLiteDatabase &m_database;
                                      ^~~~~~~~~~
../../src/./wallet/sqlite.h:47:45: error: ‘maybe_unused’ attribute ignored [-Werror=attributes]
     [[maybe_unused]] const bool m_mock{false};
                                             ^
cc1plus: all warnings being treated as errors
[372/511] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[373/511] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[374/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[375/511] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[376/511] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[377/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[378/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[379/511] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[380/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[381/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/__/interfaces/wallet.cpp.o
[382/511] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[383/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[384/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[385/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcdump.cpp.o
[386/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[387/511] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1
PiRK planned changes to this revision.Thu, Nov 25, 14:31
PiRK edited the summary of this revision. (Show Details)

rebase and comment out m_database

This revision is now accepted and ready to land.Fri, Nov 26, 13:13