From 5fb17a66b85f7dde6dbaa378c280e96b63d70366 Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Mon, 4 Nov 2019 07:37:19 -0600 Subject: [PATCH] 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; ^ --- src/test_lib_json/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 8afed1d..ad34c8a 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -2234,7 +2234,6 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, writeNestedObjects) { } JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) { - Json::StyledStreamWriter writer; { // Array member has more than 20 print effect rendering lines const Json::String expected("[\n\t0," @@ -2268,6 +2267,7 @@ JSONTEST_FIXTURE_LOCAL(StyledStreamWriterTest, multiLineArray) { JSONTEST_ASSERT_STRING_EQUAL(expected, result); } { + Json::StyledStreamWriter writer; // Array members do not exceed 21 print effects to render a single line const Json::String expected("[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]\n"); Json::Value root;