mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-06 21:57:54 +02:00
fuzz: Remove unused g_setup pointers
These are unused and removing them avoids clang warnings like: src/test/fuzz/deserialize.cpp:42:26: error: variable g_setup set but not used [-Werror,-Wunused-but-set-variable]
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