-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Update to python3 #1084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to python3 #1084
Conversation
jsoncpp/src/test_lib_json/main.cpp:354:31: error: implicit conversion changes signedness: 'int' to 'std::__1::vector<Json::Value *, std::__1::allocator<Json::Value *> >::size_type' aka 'unsigned long') [-Werror,-Wsign-conversion] JSONTEST_ASSERT_EQUAL(vec[i], &array[i]); ~~~ ^
jsoncpp/src/test_lib_json/main.cpp:2261:30: warning: declaration shadows a local variable [-Wshadow] Json::StyledStreamWriter writer; ^ jsoncpp/src/test_lib_json/main.cpp:2237:28: note: previous declaration is here Json::StyledStreamWriter writer; ^
@@ -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++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine, but I'm kind of curious why this error just started happening. Any idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New apple clang compiler with Mac 10.15, XCode 11.2 refused to compile the previous code due to ambiguities.
@@ -2268,6 +2267,7 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) { | |||
JSONTEST_ASSERT_STRING_EQUAL(expected, result); | |||
} | |||
{ | |||
Json::StyledStreamWriter writer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really understand how adding a writer
would remove a shadowed variable. I'm sure it's fine, but could you explain it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the original code the line 2237 shadows line 2261 below it, but is not used unit line 2270.
Scope the variable called "writer" in the blocks that need them. It may also have been OK to remove line 2261 in the original code, but I was not sure what the intent of making a new write was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to remove line 2261 when i wrote this testcase.
@@ -2234,7 +2234,6 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, writeNestedObjects) { | |||
} | |||
|
|||
JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) { | |||
Json::StyledStreamWriter writer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line 2237 shadows line 2261 below, but is not used unit line 2270.
I‘m just a liitle curious about why coverage has dropped, and found that it's because the commit 50671dd, and now I'm more curious about why this change can influence the coverage. |
There’s now an unexecuted branch for old versions of CMake.
On Wed, Nov 6, 2019 at 2:35 AM dota17 ***@***.***> wrote:
I‘m just a liitle curious about why coverage has dropped, and found that
it's because the commit 50671dd
<50671dd>,
and now I'm more curious about why this change can influence the coverage.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1084?email_source=notifications&email_token=ACBWORBS724O42NEHR4SXW3QSJXUBA5CNFSM4JIT2M5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDFSMPQ#issuecomment-550184510>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBWORAQLAPMM6646CHWBMLQSJXUBANCNFSM4JIT2M5A>
.
--
ǝnɥɐuop ʎllıq
|
Fix conflict: which has been modified in #1084
No description provided.