From 1e08af816dcdedc17e1272434b542ed535433623 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Tue, 23 Mar 2021 12:31:03 +0100 Subject: [PATCH] :rotating_light: fix warning --- test/src/unit-diagnostics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/src/unit-diagnostics.cpp b/test/src/unit-diagnostics.cpp index 1cea374a7..21ced33b1 100644 --- a/test/src/unit-diagnostics.cpp +++ b/test/src/unit-diagnostics.cpp @@ -93,7 +93,8 @@ TEST_CASE("Better diagnostics") SECTION("Parse error") { - CHECK_THROWS_WITH_AS(json::parse(""), "[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal", json::parse_error); + json _; + CHECK_THROWS_WITH_AS(_ = json::parse(""), "[json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - unexpected end of input; expected '[', '{', or a literal", json::parse_error); } SECTION("Regression test for https://github.com/nlohmann/json/pull/2562#pullrequestreview-574858448")