aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz
diff options
context:
space:
mode:
authorstickies-v <stickies-v@protonmail.com>2024-05-07 14:21:35 +0100
committerstickies-v <stickies-v@protonmail.com>2024-06-13 11:20:49 +0100
commit260f8da71a35232d859d7705861fc1a88bfbbe81 (patch)
tree0b6a6ab3dcbc06affa5c84bbf8f7966d5ba6d5cc /src/test/fuzz
parent9c4b0b7ce459765fa1a63b410c3423b90f0d2a5f (diff)
refactor: remove warnings globals
Diffstat (limited to 'src/test/fuzz')
-rw-r--r--src/test/fuzz/timeoffsets.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/fuzz/timeoffsets.cpp b/src/test/fuzz/timeoffsets.cpp
index 019337a94a..dfa4dd705d 100644
--- a/src/test/fuzz/timeoffsets.cpp
+++ b/src/test/fuzz/timeoffsets.cpp
@@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <node/timeoffsets.h>
+#include <node/warnings.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/util/setup_common.h>
@@ -19,7 +20,8 @@ void initialize_timeoffsets()
FUZZ_TARGET(timeoffsets, .init = initialize_timeoffsets)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
- TimeOffsets offsets{};
+ node::Warnings warnings{};
+ TimeOffsets offsets{warnings};
LIMITED_WHILE(fuzzed_data_provider.remaining_bytes() > 0, 4'000) {
(void)offsets.Median();
offsets.Add(std::chrono::seconds{fuzzed_data_provider.ConsumeIntegral<std::chrono::seconds::rep>()});