From cec6b216950ee91fd93cf831941123f9f39019cf Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 12 Sep 2021 22:48:34 +0200 Subject: [PATCH] :rotating_light: fix warning --- test/src/unit-bon8.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/src/unit-bon8.cpp b/test/src/unit-bon8.cpp index db243e6fd..047e4e5af 100644 --- a/test/src/unit-bon8.cpp +++ b/test/src/unit-bon8.cpp @@ -672,7 +672,8 @@ TEST_CASE("BON8") SECTION("invalid string") { std::vector v = {0xF0, 0x9F, 0x80, 0x84}; - CHECK_THROWS_WITH_AS(json::from_bon8(v), "[json.exception.parse_error.110] parse error at byte 5: syntax error while parsing BON8 string: unexpected end of input", json::parse_error); + json j; + CHECK_THROWS_WITH_AS(j = json::from_bon8(v), "[json.exception.parse_error.110] parse error at byte 5: syntax error while parsing BON8 string: unexpected end of input", json::parse_error); } }