From 7429bb2bfa5f7c90c7b63c6103d75033fe244dd9 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 4 Nov 2019 07:35:52 -0600 Subject: [PATCH] COMP: Fix type mismatch ambiguity jsoncpp/src/test_lib_json/main.cpp:354:31: error: implicit conversion changes signedness: 'int' to 'std::__1::vector >::size_type' aka 'unsigned long') [-Werror,-Wsign-conversion] JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); ~~~ ^ --- src/test_lib_json/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 1d636d8..8afed1d 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -350,7 +350,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) { JSONTEST_ASSERT_EQUAL(Json::Value("index1"), array[2]); JSONTEST_ASSERT_EQUAL(Json::Value("index2"), array[3]); // checking address - for (int i = 0; i < 3; i++) { + for (Json::ArrayIndex i = 0; i < 3; i++) { JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); } vec.push_back(&array[3]); @@ -362,7 +362,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) { JSONTEST_ASSERT_EQUAL(Json::Value("index1"), array[3]); JSONTEST_ASSERT_EQUAL(Json::Value("index2"), array[4]); // checking address - for (int i = 0; i < 4; i++) { + for (Json::ArrayIndex i = 0; i < 4; i++) { JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); } vec.push_back(&array[4]); @@ -376,7 +376,7 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, arrayInsertAtRandomIndex) { JSONTEST_ASSERT_EQUAL(Json::Value("index2"), array[4]); JSONTEST_ASSERT_EQUAL(Json::Value("index5"), array[5]); // checking address - for (int i = 0; i < 5; i++) { + for (Json::ArrayIndex i = 0; i < 5; i++) { JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); } vec.push_back(&array[5]);