diff --git a/tests/src/unit-ordered_json.cpp b/tests/src/unit-ordered_json.cpp index 2c72b3e8c..8c07ffa16 100644 --- a/tests/src/unit-ordered_json.cpp +++ b/tests/src/unit-ordered_json.cpp @@ -534,9 +534,10 @@ TEST_CASE("object_key_index") // the hashes are not distinct on purpose: elements with the same // hash are told apart by the caller - const auto hash_of = [](std::size_t position) + const auto hash_of = [](std::size_t position) -> std::size_t { - return (position % 50) * 0x9E3779B97F4A7C15ull; + // truncated to 32 bits where std::size_t is that small + return static_cast((position % 50) * 0x9E3779B97F4A7C15ull); }; std::vector hashes; diff --git a/tests/src/unit-regression1.cpp b/tests/src/unit-regression1.cpp index 9338365c8..53f501f07 100644 --- a/tests/src/unit-regression1.cpp +++ b/tests/src/unit-regression1.cpp @@ -1555,6 +1555,7 @@ TEST_CASE("regression tests 1") { my_json j = make(); #ifdef JSON_NO_THREAD_LOCAL + // (set by the user, or by the library for clang with MinGW) // the objects below the outermost one are not copied by their // object_t here, but member by member, which keeps their // timestamps correct: "c" is not mistaken for "b" and is inserted