From 572b0758023e304f59294442e4b9843209014147 Mon Sep 17 00:00:00 2001 From: khizmax Date: Thu, 4 May 2017 10:38:06 +0300 Subject: [PATCH] Fixed "dangling-else" GCC7 warning --- test/stress/map/find_string/map_find_string.h | 3 ++- test/stress/stack/push.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/stress/map/find_string/map_find_string.h b/test/stress/map/find_string/map_find_string.h index 81f543c6..5479e3b8 100644 --- a/test/stress/map/find_string/map_find_string.h +++ b/test/stress/map/find_string/map_find_string.h @@ -170,8 +170,9 @@ namespace map { // Fill the map for ( size_t i = 0; i < s_Data.size(); ++i ) { // All keys in arrData are unique, insert() must be successful - if ( s_Data[i].bExists ) + if ( s_Data[i].bExists ) { EXPECT_TRUE( check_result( testMap.insert( *(s_Data[i].pKey), s_Data[i] ), testMap )); + } } propout() << std::make_pair( "thread_count", s_nThreadCount ) diff --git a/test/stress/stack/push.cpp b/test/stress/stack/push.cpp index a580e858..1ba57d7a 100644 --- a/test/stress/stack/push.cpp +++ b/test/stress/stack/push.cpp @@ -193,8 +193,9 @@ namespace { size_t nError = 0; for ( size_t i = 0; i < nTotalItems; ++i ) { EXPECT_EQ( arr[i], 1 ) << "i=" << i; - if ( ++nError > 10 ) + if ( ++nError > 10 ) { ASSERT_EQ( arr[i], 1 ); + } } } }; -- 2.34.1