From 8abbc36d7da3bb7c0a5374edd5ef8cd27b9f5f4f Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 18 Oct 2026 13:27:02 +0200 Subject: [PATCH] Count matching keys as unsigned in the json_view access test The conditional added 1 or 0 as int to a std::size_t, which GCC rejects with -Werror=sign-conversion (ci_test_standards_gcc). Signed-off-by: Niels Lohmann --- tests/src/unit-json_view.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/src/unit-json_view.cpp b/tests/src/unit-json_view.cpp index 18872bf3e..a8de2d8ad 100644 --- a/tests/src/unit-json_view.cpp +++ b/tests/src/unit-json_view.cpp @@ -734,7 +734,7 @@ void check_access(const ordered_json_view& v, const ordered_json& j) std::size_t occurrences = 0; for (auto other = v.begin(); other != v.end(); ++other) { - occurrences += other.key() == it.key() ? 1 : 0; + occurrences += other.key() == it.key() ? 1u : 0u; } CHECK(v.count(key) == occurrences); // lookups find the first member with the key, which is this one if