aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2020-06-08 13:14:38 +0800
committerfanquake <fanquake@gmail.com>2020-06-08 13:47:58 +0800
commit807b9f811479a2b5a4b29e44fe915e054bd92fc3 (patch)
tree45914040b488fc0eaeadf32f67f5a2c4545d1ee2 /src
parentb3091b2be7d1e5ab86d7380a884d4f23a5e9c9b7 (diff)
parentfac6b9b938230d24c13fcb6e9be28515d674c6c8 (diff)
Merge #19188: test: Avoid overwriting the NodeContext member of the testing setup [-Wshadow-field]
fac6b9b938230d24c13fcb6e9be28515d674c6c8 test: Avoid overwriting the NodeContext member of the testing setup (MarcoFalke) fa16e7816b886b82d36457b0d8edc773cba76421 build: Add -Wshadow-field (MarcoFalke) Pull request description: Adding this warning will eliminate unexpected test failures and hard to review code. Moreover, there shouldn't be a use case in Bitcoin Core that relies on fields to be shadowed. ACKs for top commit: fanquake: ACK fac6b9b938230d24c13fcb6e9be28515d674c6c8 - Warnings compiling fa16e7816b886b82d36457b0d8edc773cba76421 are below. No warnings with fac6b9b938230d24c13fcb6e9be28515d674c6c8. The `-Wshadow-field` diagnostic has been available in Clang since 5.0.0. It's not available for GCC. practicalswift: ACK fac6b9b938230d24c13fcb6e9be28515d674c6c8 -- patch looks correct hebasto: ACK fac6b9b938230d24c13fcb6e9be28515d674c6c8, tested on Linux Mint 19.3 (x86_64): Tree-SHA512: 824874ca10877efea7463cf934a2953147f3f99c486f04679426c14ff968975d8652cbba5729bfb7cb2c86c637ade5d1e5b873d611c06bad013a7cad8427e2bf
Diffstat (limited to 'src')
-rw-r--r--src/wallet/test/init_test_fixture.h1
-rw-r--r--src/wallet/test/wallet_test_fixture.h1
-rw-r--r--src/wallet/test/wallet_tests.cpp1
3 files changed, 0 insertions, 3 deletions
diff --git a/src/wallet/test/init_test_fixture.h b/src/wallet/test/init_test_fixture.h
index 6ba7d66b7c..c95b4f1f6e 100644
--- a/src/wallet/test/init_test_fixture.h
+++ b/src/wallet/test/init_test_fixture.h
@@ -18,7 +18,6 @@ struct InitWalletDirTestingSetup: public BasicTestingSetup {
fs::path m_datadir;
fs::path m_cwd;
std::map<std::string, fs::path> m_walletdir_path_cases;
- NodeContext m_node;
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
std::unique_ptr<interfaces::ChainClient> m_chain_client;
};
diff --git a/src/wallet/test/wallet_test_fixture.h b/src/wallet/test/wallet_test_fixture.h
index a294935b64..6c32868b1e 100644
--- a/src/wallet/test/wallet_test_fixture.h
+++ b/src/wallet/test/wallet_test_fixture.h
@@ -19,7 +19,6 @@
struct WalletTestingSetup: public TestingSetup {
explicit WalletTestingSetup(const std::string& chainName = CBaseChainParams::MAIN);
- NodeContext m_node;
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
std::unique_ptr<interfaces::ChainClient> m_chain_client = interfaces::MakeWalletClient(*m_chain, {});
CWallet m_wallet;
diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp
index 3654420eb2..6f8c973f25 100644
--- a/src/wallet/test/wallet_tests.cpp
+++ b/src/wallet/test/wallet_tests.cpp
@@ -535,7 +535,6 @@ public:
return it->second;
}
- NodeContext m_node;
std::unique_ptr<interfaces::Chain> m_chain = interfaces::MakeChain(m_node);
std::unique_ptr<CWallet> wallet;
};