From 84db6ff66ef3f8877de281ef49c28391c6473258 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 18 Nov 2026 10:55:42 +0100 Subject: [PATCH] Ignore the dump() result in the long-token test explicitly GCC rejects the discarded nodiscard result with -Werror=unused-result. Signed-off-by: Niels Lohmann --- tests/src/unit-class_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-class_parser.cpp b/tests/src/unit-class_parser.cpp index 74fcc6cac..2e095ab8c 100644 --- a/tests/src/unit-class_parser.cpp +++ b/tests/src/unit-class_parser.cpp @@ -3452,7 +3452,7 @@ TEST_CASE("parse error message of a long token") CHECK(tail <= 4096); CHECK(tail > 4092); CHECK(text.compare(text.size() - tail, tail, shown, dots + 3, tail) == 0); - CHECK_NOTHROW(json(shown).dump()); + CHECK_NOTHROW(utils::ignore_return_value(json(shown).dump())); for (int kind = 1; kind < 4; ++kind) {