From: khizmax Date: Thu, 4 May 2017 07:38:06 +0000 (+0300) Subject: Fixed "dangling-else" GCC7 warning X-Git-Tag: v2.3.0~45 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=572b0758023e304f59294442e4b9843209014147;p=libcds.git Fixed "dangling-else" GCC7 warning --- 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 ); + } } } };