diff --git a/tests/src/unit-bjdata.cpp b/tests/src/unit-bjdata.cpp index c7deda0ba..04ee3acc4 100644 --- a/tests/src/unit-bjdata.cpp +++ b/tests/src/unit-bjdata.cpp @@ -4787,7 +4787,8 @@ TEST_CASE("BJData optimized arrays from contiguous and non-contiguous input") std::string bytewise_error; try { - static_cast(json::from_bjdata(contiguous)); + json _; + _ = json::from_bjdata(contiguous); } catch (const json::exception& e) { @@ -4795,7 +4796,8 @@ TEST_CASE("BJData optimized arrays from contiguous and non-contiguous input") } try { - static_cast(json::from_bjdata(bytewise.begin(), bytewise.end())); + json _; + _ = json::from_bjdata(bytewise.begin(), bytewise.end()); } catch (const json::exception& e) { diff --git a/tests/src/unit-ubjson.cpp b/tests/src/unit-ubjson.cpp index 2552dde48..04983da1c 100644 --- a/tests/src/unit-ubjson.cpp +++ b/tests/src/unit-ubjson.cpp @@ -3436,7 +3436,8 @@ TEST_CASE("UBJSON optimized arrays from contiguous and non-contiguous input") std::string bytewise_error; try { - static_cast(json::from_ubjson(contiguous)); + json _; + _ = json::from_ubjson(contiguous); } catch (const json::exception& e) { @@ -3444,7 +3445,8 @@ TEST_CASE("UBJSON optimized arrays from contiguous and non-contiguous input") } try { - static_cast(json::from_ubjson(bytewise.begin(), bytewise.end())); + json _; + _ = json::from_ubjson(bytewise.begin(), bytewise.end()); } catch (const json::exception& e) {