Fixed "dangling-else" GCC7 warning
authorkhizmax <khizmax@gmail.com>
Thu, 4 May 2017 07:38:06 +0000 (10:38 +0300)
committerkhizmax <khizmax@gmail.com>
Thu, 4 May 2017 07:38:06 +0000 (10:38 +0300)
test/stress/map/find_string/map_find_string.h
test/stress/stack/push.cpp

index 81f543c6e97be561071cdd404135b1cdbd68e153..5479e3b854b541b4923a21251aefbf7cb3fc3cce 100644 (file)
@@ -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 )
index a580e85861eb3f89e73f41f217d45ad711d3eb02..1ba57d7a156d91fa135eec98d4f92e4c725993fd 100644 (file)
@@ -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 );
+                }
             }
         }
     };