mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
Merge bitcoin/bitcoin#34918: fuzz: [refactor] Remove unused g_setup pointers
fabbfec3b0fuzz: 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: ACKfabbfec3b0. hodlinator: ACKfabbfec3b0Tree-SHA512: 21a3459574316617aa98bb04e5b27173c4bb1e89d71ce1fb3fb3066f8d6e2b3bf1d1fd516a74f7ae3f9052b492edeec00d3365cb5781c5f79ebb828da7af520e
This commit is contained in:
@@ -38,18 +38,13 @@
|
||||
using kernel::CBlockFileInfo;
|
||||
using node::SnapshotMetadata;
|
||||
|
||||
namespace {
|
||||
const BasicTestingSetup* g_setup;
|
||||
} // namespace
|
||||
|
||||
void initialize_deserialize()
|
||||
{
|
||||
static const auto testing_setup = MakeNoLogFileContext<>();
|
||||
g_setup = testing_setup.get();
|
||||
}
|
||||
|
||||
#define FUZZ_TARGET_DESERIALIZE(name, code) \
|
||||
FUZZ_TARGET(name, .init = initialize_deserialize) \
|
||||
FUZZ_TARGET(name, .init = initialize_deserialize) \
|
||||
{ \
|
||||
try { \
|
||||
code \
|
||||
|
||||
@@ -27,12 +27,10 @@
|
||||
|
||||
namespace {
|
||||
|
||||
const TestingSetup* g_setup;
|
||||
std::deque<COutPoint> g_available_coins;
|
||||
void initialize_miner()
|
||||
{
|
||||
static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
|
||||
g_setup = testing_setup.get();
|
||||
for (uint32_t i = 0; i < uint32_t{100}; ++i) {
|
||||
g_available_coins.emplace_back(Txid::FromUint256(uint256::ZERO), i);
|
||||
}
|
||||
|
||||
@@ -11,11 +11,9 @@
|
||||
namespace wallet {
|
||||
namespace {
|
||||
|
||||
const TestingSetup* g_setup;
|
||||
void initialize_crypter()
|
||||
{
|
||||
static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
|
||||
g_setup = testing_setup.get();
|
||||
}
|
||||
|
||||
FUZZ_TARGET(crypter, .init = initialize_crypter)
|
||||
|
||||
Reference in New Issue
Block a user