Skip to content

Commit 3543485

Browse files
committed
Suppress warning in tests with older GCCs
1 parent f57a91e commit 3543485

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_decode.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ auto decode_tests(Builder &_, Callable &&do_decode) {
9191

9292
_.test("string", [do_decode]() {
9393
auto data = make_data<InType>("4:spam");
94-
auto within_data_memory = within_memory(data);
94+
// Silence GCC < 10.
95+
[[maybe_unused]] auto within_data_memory = within_memory(data);
9596

9697
auto value = do_decode(data);
9798
auto str = get<typename OutType::string>(value);
@@ -111,7 +112,8 @@ auto decode_tests(Builder &_, Callable &&do_decode) {
111112

112113
_.test("dict", [do_decode]() {
113114
auto data = make_data<InType>("d4:spami42ee");
114-
auto within_data_memory = within_memory(data);
115+
// Silence GCC < 10.
116+
[[maybe_unused]] auto within_data_memory = within_memory(data);
115117

116118
auto value = do_decode(data);
117119
auto dict = get<typename OutType::dict>(value);

0 commit comments

Comments
 (0)