Skip to content

Commit 99f99c9

Browse files
committed
Merge bitcoin#34918: fuzz: [refactor] Remove unused g_setup pointers
fabbfec fuzz: Remove unused g_setup pointers (MarcoFalke) Pull request description: This is unused and avoids a clang warning. Can be tested via: `git grep --count '\<g_setup' | grep ':2'` Before: Prints files names. After: No output. ACKs for top commit: hebasto: ACK fabbfec. hodlinator: ACK fabbfec Tree-SHA512: 21a3459574316617aa98bb04e5b27173c4bb1e89d71ce1fb3fb3066f8d6e2b3bf1d1fd516a74f7ae3f9052b492edeec00d3365cb5781c5f79ebb828da7af520e
2 parents fde3777 + fabbfec commit 99f99c9

3 files changed

Lines changed: 1 addition & 10 deletions

File tree

src/test/fuzz/deserialize.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,13 @@
3838
using kernel::CBlockFileInfo;
3939
using node::SnapshotMetadata;
4040

41-
namespace {
42-
const BasicTestingSetup* g_setup;
43-
} // namespace
44-
4541
void initialize_deserialize()
4642
{
4743
static const auto testing_setup = MakeNoLogFileContext<>();
48-
g_setup = testing_setup.get();
4944
}
5045

5146
#define FUZZ_TARGET_DESERIALIZE(name, code) \
52-
FUZZ_TARGET(name, .init = initialize_deserialize) \
47+
FUZZ_TARGET(name, .init = initialize_deserialize) \
5348
{ \
5449
try { \
5550
code \

src/test/fuzz/mini_miner.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@
2727

2828
namespace {
2929

30-
const TestingSetup* g_setup;
3130
std::deque<COutPoint> g_available_coins;
3231
void initialize_miner()
3332
{
3433
static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
35-
g_setup = testing_setup.get();
3634
for (uint32_t i = 0; i < uint32_t{100}; ++i) {
3735
g_available_coins.emplace_back(Txid::FromUint256(uint256::ZERO), i);
3836
}

src/wallet/test/fuzz/crypter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
namespace wallet {
1212
namespace {
1313

14-
const TestingSetup* g_setup;
1514
void initialize_crypter()
1615
{
1716
static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
18-
g_setup = testing_setup.get();
1917
}
2018

2119
FUZZ_TARGET(crypter, .init = initialize_crypter)

0 commit comments

Comments
 (0)