fixed minor gcc warnings
authorkhizmax <libcds.dev@gmail.com>
Mon, 26 Sep 2016 20:46:42 +0000 (23:46 +0300)
committerkhizmax <libcds.dev@gmail.com>
Mon, 26 Sep 2016 20:46:42 +0000 (23:46 +0300)
test/stress/map/find_int/map_find_int.h
test/stress/map/find_string/map_find_string.h
test/unit/intrusive-set/test_intrusive_michael_lazy_rcu.h
test/unit/intrusive-set/test_intrusive_michael_michael_rcu.h
test/unit/intrusive-set/test_intrusive_set_nogc.h
test/unit/queue/test_bounded_queue.h
test/unit/set/test_michael_iterable.h
test/unit/set/test_michael_lazy_rcu.h
test/unit/set/test_michael_michael_rcu.h
test/unit/set/test_set.h
test/unit/striped-set/test_striped_set.h

index 56d0b62cde1c7b3b9b248759e5d1c7f612536996..c7c69de5ca8e2665c4a16dc3e839425b61bc9db4 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -25,7 +25,7 @@
     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #include "map_type.h"
@@ -198,9 +198,9 @@ namespace map {
                 nMissingSuccess += w.m_KeyNotExists.nSuccess;
                 nMissingFailed += w.m_KeyNotExists.nFailed;
 
-                EXPECT_EQ( w.m_KeyExists.nFailed, 0 ) << "thread " << i;
+                EXPECT_EQ( w.m_KeyExists.nFailed, 0u ) << "thread " << i;
                 EXPECT_EQ( w.m_KeyExists.nSuccess, s_nRealMapSize * s_nPassCount ) << "thread " << i;
-                EXPECT_EQ( w.m_KeyNotExists.nFailed, 0 ) << "thread " << i;
+                EXPECT_EQ( w.m_KeyNotExists.nFailed, 0u ) << "thread " << i;
                 EXPECT_EQ( w.m_KeyNotExists.nSuccess, (s_Data.size() - s_nRealMapSize) * s_nPassCount ) << "thread " << i;
             }
 
index 3aa9ac6a3f6ec5b97cf5ee83d7bc5245e74fbfbc..0b2e050b273e6a5e75cf9ceda9189fc0bdf6ea9a 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -200,9 +200,9 @@ namespace map {
                 nMissingFailed += w.m_KeyNotExists.nFailed;
 
                 EXPECT_EQ( w.m_KeyExists.nSuccess, s_nMapSize * s_nPassCount ) << "thread " << i;
-                EXPECT_EQ( w.m_KeyExists.nFailed, 0 ) << "thread " << i;
+                EXPECT_EQ( w.m_KeyExists.nFailed, 0u ) << "thread " << i;
                 EXPECT_EQ( w.m_KeyNotExists.nSuccess, (s_Data.size() - s_nMapSize) * s_nPassCount ) << "thread " << i;
-                EXPECT_EQ( w.m_KeyNotExists.nFailed, 0 ) << "thread " << i;
+                EXPECT_EQ( w.m_KeyNotExists.nFailed, 0u ) << "thread " << i;
             }
 
             propout()
@@ -222,7 +222,7 @@ namespace map {
         template <class Map>
         void run_test()
         {
-            ASSERT_GT( s_Data.size(), 0 );
+            ASSERT_GT( s_Data.size(), 0u );
 
             Map testMap( *this );
             test( testMap );
index 9ce91d0f5397e331ea1a42d6f324ff90818b4a39..4dcf8adec42bc0ecdcc147fa73f9d9c8f3c54b14 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -196,7 +196,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, base_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( IntrusiveMichaelLazySet, base_wrapped_stat )
@@ -224,7 +224,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, base_wrapped_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( IntrusiveMichaelLazySet, member_cmp )
@@ -366,7 +366,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( IntrusiveMichaelLazySet, member_wrapped_stat )
@@ -394,7 +394,7 @@ TYPED_TEST_P( IntrusiveMichaelLazySet, member_wrapped_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 // GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
index 17b15535f3809444a5056446e7e4151a062846a0..66bb8182eb081dfc8a1ee12dde096bba0f5f4742 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -168,7 +168,7 @@ TYPED_TEST_P( IntrusiveMichaelSet, base_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( IntrusiveMichaelSet, base_wrapped_stat )
@@ -197,7 +197,7 @@ TYPED_TEST_P( IntrusiveMichaelSet, base_wrapped_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( IntrusiveMichaelSet, member_cmp )
@@ -312,7 +312,7 @@ TYPED_TEST_P( IntrusiveMichaelSet, member_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( IntrusiveMichaelSet, member_wrapped_stat )
@@ -340,7 +340,7 @@ TYPED_TEST_P( IntrusiveMichaelSet, member_wrapped_stat )
 
     set_type s( TestFixture::kSize, 2 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 // GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
index f4f4b2c25e0f0fdd6029f2aa74bd30582de4e7ee..062a251e8fdc183f571e8738883b951cec84a3b8 100644 (file)
@@ -315,7 +315,7 @@ namespace cds_test {
                     EXPECT_EQ( i.nUpdateCount, 1u );
                     break;
                 case 1:
-                    EXPECT_EQ( i.nUpdateNewCount, 0 );
+                    EXPECT_EQ( i.nUpdateNewCount, 0u );
                     updResult = s.update( i, []( bool bNew, value_type& val, value_type& arg )
                     {
                         EXPECT_TRUE( bNew );
index ff7ffa172b28380d1a807e21d3dab9c1c1d37e74..263ed5f80c43fde8d499af28e1a4fa2af2dd9a90 100644 (file)
@@ -136,12 +136,12 @@ namespace cds_test {
             // pop from empty queue
             it = static_cast<int>(nSize * 2);
             ASSERT_FALSE( q.pop( it ) );
-            ASSERT_EQ( it, nSize * 2 );
+            ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
             ASSERT_TRUE( q.empty() );
             ASSERT_CONTAINER_SIZE( q, 0u );
 
             ASSERT_FALSE( q.dequeue( it ) );
-            ASSERT_EQ( it, nSize * 2 );
+            ASSERT_EQ( it, static_cast<value_type>( nSize * 2 ));
             ASSERT_TRUE( q.empty() );
             ASSERT_CONTAINER_SIZE( q, 0u );
         }
index 607b277fe21532c21c15046c5e5bc20e2a950d56..01501cb1f79d939713d8e61a943aa318fc125627 100644 (file)
@@ -113,7 +113,7 @@ namespace cds_test {
                     EXPECT_TRUE( s.find( i.nKey, []( value_type const& v, int key ) 
                         {
                             EXPECT_EQ( v.key(), key );
-                            EXPECT_EQ( v.nFindCount, 1 );
+                            EXPECT_EQ( v.nFindCount, 1u );
                         }));
                     break;
                 case 3:
@@ -122,7 +122,7 @@ namespace cds_test {
                     EXPECT_TRUE( s.find( i.nKey, []( value_type const& v, int key ) 
                         {
                             EXPECT_EQ( v.key(), key );
-                            EXPECT_EQ( v.nFindCount, 1 );
+                            EXPECT_EQ( v.nFindCount, 1u );
                         }));
                     break;
                 case 4:
@@ -139,7 +139,7 @@ namespace cds_test {
                         {
                             ASSERT_FALSE( old == nullptr );
                             EXPECT_EQ( v.key(), old->key() );
-                            EXPECT_EQ( old->nUpdateNewCount, 1 );
+                            EXPECT_EQ( old->nUpdateNewCount, 1u );
                             v.nUpdateNewCount = old->nUpdateNewCount;
                             ++v.nUpdateCount;
                         }, false );
@@ -149,8 +149,8 @@ namespace cds_test {
                     EXPECT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
                         {
                             EXPECT_EQ( v.key(), key );
-                            EXPECT_EQ( v.nUpdateNewCount, 1 );
-                            EXPECT_EQ( v.nUpdateCount, 1 );
+                            EXPECT_EQ( v.nUpdateNewCount, 1u );
+                            EXPECT_EQ( v.nUpdateCount, 1u );
                     }));
                     break;
                 case 5:
@@ -167,7 +167,7 @@ namespace cds_test {
                         {
                             EXPECT_FALSE( old == nullptr );
                             EXPECT_EQ( v.key(), old->key() );
-                            EXPECT_EQ( old->nUpdateNewCount, 1 );
+                            EXPECT_EQ( old->nUpdateNewCount, 1u );
                             v.nUpdateNewCount = old->nUpdateNewCount;
                             ++v.nUpdateCount;
                         }, false );
@@ -177,8 +177,8 @@ namespace cds_test {
                     EXPECT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                         {
                             EXPECT_EQ( v.key(), arg.key() );
-                            EXPECT_EQ( v.nUpdateNewCount, 1 );
-                            EXPECT_EQ( v.nUpdateCount, 1 );
+                            EXPECT_EQ( v.nUpdateNewCount, 1u );
+                            EXPECT_EQ( v.nUpdateCount, 1u );
                     }));
                     break;
                 case 6:
@@ -280,11 +280,11 @@ namespace cds_test {
                     }));
                 EXPECT_TRUE( s.find( i, []( value_type& v, value_type const& ) 
                     { 
-                        EXPECT_EQ( ++v.nFindCount, 2 );
+                        EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
                 EXPECT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) 
                     { 
-                        EXPECT_EQ( ++v.nFindCount, 3 );
+                        EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
 
                 int nKey = i.key() - 1;
@@ -353,7 +353,7 @@ namespace cds_test {
                 EXPECT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
             EXPECT_TRUE( s.empty() );
-            EXPECT_CONTAINER_SIZE( s, 0 );
+            EXPECT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
@@ -367,7 +367,7 @@ namespace cds_test {
             s.clear();
 
             EXPECT_TRUE( s.empty() );
-            EXPECT_CONTAINER_SIZE( s, 0 );
+            EXPECT_CONTAINER_SIZE( s, 0u );
 
             EXPECT_TRUE( s.begin() == s.end() );
             EXPECT_TRUE( s.cbegin() == s.cend() );
index 89a940253516c2be40218f21be08ed6287768ef1..d7e76df683da5775fb702c7a2c11f4d28fcdf0b7 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -238,7 +238,7 @@ TYPED_TEST_P( MichaelLazySet, stat )
 
     set_type s( TestFixture::kSize, 4 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( MichaelLazySet, wrapped_stat )
@@ -263,7 +263,7 @@ TYPED_TEST_P( MichaelLazySet, wrapped_stat )
 
     set_type s( TestFixture::kSize, 4 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 // GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
index 5762e94e4adc516250515ba3c7546b3260166d85..d744eec7f3e7b9954c46f20af1426206502914f7 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -214,7 +214,7 @@ TYPED_TEST_P( MichaelSet, stat )
 
     set_type s( TestFixture::kSize, 4 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 TYPED_TEST_P( MichaelSet, wrapped_stat )
@@ -239,7 +239,7 @@ TYPED_TEST_P( MichaelSet, wrapped_stat )
 
     set_type s( TestFixture::kSize, 4 );
     this->test( s );
-    EXPECT_GE( s.statistics().m_nInsertSuccess, 0 );
+    EXPECT_GE( s.statistics().m_nInsertSuccess, 0u );
 }
 
 // GCC 5: All test names should be written on single line, otherwise a runtime error will be encountered like as
index c1b2599154f9af77acf5f8824e02636314675254..6ccc966650b6c2f549ed14e0a610a8489f8b5d98 100644 (file)
@@ -112,7 +112,7 @@ namespace cds_test {
                     ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key ) 
                         {
                             EXPECT_EQ( v.key(), key );
-                            EXPECT_EQ( v.nFindCount, 1 );
+                            EXPECT_EQ( v.nFindCount, 1u );
                         }));
                     break;
                 case 3:
@@ -121,7 +121,7 @@ namespace cds_test {
                     ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key ) 
                         {
                             EXPECT_EQ( v.key(), key );
-                            EXPECT_EQ( v.nFindCount, 1 );
+                            EXPECT_EQ( v.nFindCount, 1u );
                         }));
                     break;
                 case 4:
@@ -223,11 +223,11 @@ namespace cds_test {
                     }));
                 ASSERT_TRUE( s.find( i, []( value_type& v, value_type const& ) 
                     { 
-                        EXPECT_EQ( ++v.nFindCount, 2 );
+                        EXPECT_EQ( ++v.nFindCount, 2u );
                     }));
                 ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) 
                     { 
-                        EXPECT_EQ( ++v.nFindCount, 3 );
+                        EXPECT_EQ( ++v.nFindCount, 3u );
                     }));
 
                 int nKey = i.key() - 1;
@@ -296,7 +296,7 @@ namespace cds_test {
                 ASSERT_FALSE( s.find_with( other_item( i.key()), other_less(), []( value_type&, other_item const& ) {} ));
             }
             ASSERT_TRUE( s.empty() );
-            ASSERT_CONTAINER_SIZE( s, 0 );
+            ASSERT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
@@ -310,7 +310,7 @@ namespace cds_test {
             s.clear();
 
             ASSERT_TRUE( s.empty() );
-            ASSERT_CONTAINER_SIZE( s, 0 );
+            ASSERT_CONTAINER_SIZE( s, 0u );
 
             ASSERT_TRUE( s.begin() == s.end() );
             ASSERT_TRUE( s.cbegin() == s.cend() );
index fed3e069a40fd3e1c825c849771acf13df42f7ca..85210b5524f1f53f1b2243c0dab3cf308a1f39ee 100644 (file)
@@ -233,7 +233,7 @@ namespace {
                     ASSERT_TRUE( s.find( i.nKey, []( value_type const& v, int key )
                     {
                         EXPECT_EQ( v.key(), key );
-                        EXPECT_EQ( v.nUpdateNewCount, 2 );
+                        EXPECT_EQ( v.nUpdateNewCount, 2u );
                     } ) );
                     break;
                 case 5:
@@ -258,7 +258,7 @@ namespace {
                     ASSERT_TRUE( s.find( i, []( value_type const& v, value_type const& arg )
                     {
                         EXPECT_EQ( v.key(), arg.key() );
-                        EXPECT_EQ( v.nUpdateNewCount, 2 );
+                        EXPECT_EQ( v.nUpdateNewCount, 2u );
                     } ) );
                     break;
                 case 6: