Skip to content

Commit d76492c

Browse files
committed
COMP: Remove shadow variable warning
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; ^
1 parent f1a44ba commit d76492c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test_lib_json/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,6 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, writeNestedObjects) {
22342234
}
22352235

22362236
JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) {
2237-
Json::StyledStreamWriter writer;
22382237
{
22392238
// Array member has more than 20 print effect rendering lines
22402239
const Json::String expected("[\n\t0,"
@@ -2268,6 +2267,7 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) {
22682267
JSONTEST_ASSERT_STRING_EQUAL(expected, result);
22692268
}
22702269
{
2270+
Json::StyledStreamWriter writer;
22712271
// Array members do not exceed 21 print effects to render a single line
22722272
const Json::String expected("[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]\n");
22732273
Json::Value root;

0 commit comments

Comments
 (0)