fuzz: fix unused variable addrdb compiler warning

This commit is contained in:
Jon Atack 2020-07-19 07:13:16 +02:00
parent 090d877160
commit 1cdc2a642b
No known key found for this signature in database
GPG key ID: 4F5721B3D0E3921D

View file

@ -17,6 +17,7 @@ void test_one_input(const std::vector<uint8_t>& buffer)
{ {
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size()); FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
// The point of this code is to exercise all CBanEntry constructors.
const CBanEntry ban_entry = [&] { const CBanEntry ban_entry = [&] {
switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 2)) { switch (fuzzed_data_provider.ConsumeIntegralInRange<int>(0, 2)) {
case 0: case 0:
@ -32,4 +33,5 @@ void test_one_input(const std::vector<uint8_t>& buffer)
} }
return CBanEntry{}; return CBanEntry{};
}(); }();
(void)ban_entry; // currently unused
} }