Fixed minor gcc warnings
authorkhizmax <libcds.dev@gmail.com>
Mon, 26 Sep 2016 20:31:53 +0000 (23:31 +0300)
committerkhizmax <libcds.dev@gmail.com>
Mon, 26 Sep 2016 20:31:53 +0000 (23:31 +0300)
21 files changed:
test/unit/intrusive-set/test_intrusive_set.h
test/unit/intrusive-set/test_intrusive_set_nogc.h
test/unit/map/michael_iterable_dhp.cpp
test/unit/map/michael_iterable_hp.cpp
test/unit/map/michael_lazy_dhp.cpp
test/unit/map/michael_lazy_hp.cpp
test/unit/map/michael_lazy_nogc.cpp
test/unit/map/michael_michael_dhp.cpp
test/unit/map/michael_michael_hp.cpp
test/unit/map/michael_michael_nogc.cpp
test/unit/map/test_michael_iterable_hp.h
test/unit/map/test_michael_lazy_rcu.h
test/unit/map/test_michael_michael_rcu.h
test/unit/misc/cxx11_atomic_class.cpp
test/unit/queue/intrusive_fcqueue.cpp
test/unit/queue/intrusive_segmented_queue_hp.cpp
test/unit/queue/test_bounded_queue.h
test/unit/set/test_michael_iterable_hp.h
test/unit/set/test_set_hp.h
test/unit/striped-set/intrusive_cuckoo_set.cpp
test/unit/striped-set/test_striped_set.h

index 44e1aa4dcc4c3bd3d77e0b8429c66283d6b8d4da..acf1f976c42ecc7c0bc1d074e35e1e1c202839f7 100644 (file)
@@ -313,11 +313,11 @@ namespace cds_test {
                     EXPECT_FALSE( updResult.second );
                     break;
                 case 1:
-                    EXPECT_EQ( i.nUpdateNewCount, 0 );
+                    EXPECT_EQ( i.nUpdateNewCount, 0u );
                     ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ));
-                    EXPECT_EQ( i.nUpdateNewCount, 1 );
+                    EXPECT_EQ( i.nUpdateNewCount, 1u );
                     ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nUpdateNewCount;} ) );
-                    EXPECT_EQ( i.nUpdateNewCount, 1 );
+                    EXPECT_EQ( i.nUpdateNewCount, 1u );
                     i.nUpdateNewCount = 0;
                     break;
                 case 2:
@@ -334,11 +334,11 @@ namespace cds_test {
                 ASSERT_TRUE( s.contains( i.nKey ) );
                 ASSERT_TRUE( s.contains( i ) );
                 ASSERT_TRUE( s.contains( other_item( i.key() ), other_less()));
-                EXPECT_EQ( i.nFindCount, 0 );
+                EXPECT_EQ( i.nFindCount, 0u );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
-                EXPECT_EQ( i.nFindCount, 1 );
+                EXPECT_EQ( i.nFindCount, 1u );
                 ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
-                EXPECT_EQ( i.nFindCount, 2 );
+                EXPECT_EQ( i.nFindCount, 2u );
             }
             ASSERT_FALSE( s.empty() );
             ASSERT_CONTAINER_SIZE( s, nSetSize );
@@ -379,18 +379,18 @@ namespace cds_test {
                     ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less() ) );
                     break;
                 case 4:
-                    EXPECT_EQ( i.nEraseCount, 0 );
+                    EXPECT_EQ( i.nEraseCount, 0u );
                     ASSERT_TRUE( s.erase( v, []( value_type& val ) { ++val.nEraseCount; } ));
-                    EXPECT_EQ( i.nEraseCount, 1 );
+                    EXPECT_EQ( i.nEraseCount, 1u );
                     ASSERT_FALSE( s.erase( v, []( value_type& val ) { ++val.nEraseCount; } ));
-                    EXPECT_EQ( i.nEraseCount, 1 );
+                    EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 case 5:
-                    EXPECT_EQ( i.nEraseCount, 0 );
+                    EXPECT_EQ( i.nEraseCount, 0u );
                     ASSERT_TRUE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
-                    EXPECT_EQ( i.nEraseCount, 1 );
+                    EXPECT_EQ( i.nEraseCount, 1u );
                     ASSERT_FALSE( s.erase_with( other_item( i.key() ), other_less(), []( value_type& val ) { ++val.nEraseCount; } ));
-                    EXPECT_EQ( i.nEraseCount, 1 );
+                    EXPECT_EQ( i.nEraseCount, 1u );
                     break;
                 }
 
@@ -401,12 +401,12 @@ 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 );
 
             // Force retiring cycle
             Set::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
             // clear
@@ -422,24 +422,24 @@ namespace cds_test {
                 ++it->nFindCount;
             }
             for ( auto it = s.cbegin(); it != s.cend(); ++it ) {
-                EXPECT_EQ( it->nFindCount, 1 );
+                EXPECT_EQ( it->nFindCount, 1u );
             }
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nFindCount, 1 );
+                EXPECT_EQ( i.nFindCount, 1u );
             }
 
             // clear 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() );
 
             // Force retiring cycle
             Set::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
         }
index 287807d331e8f577e802b9d4ec33c48749efd901..f4f4b2c25e0f0fdd6029f2aa74bd30582de4e7ee 100644 (file)
@@ -303,7 +303,7 @@ namespace cds_test {
                 case 0:
                     ASSERT_TRUE( s.insert( i ));
                     ASSERT_FALSE( s.insert( i ));
-                    EXPECT_EQ( i.nUpdateCount, 0 );
+                    EXPECT_EQ( i.nUpdateCount, 0u );
                     updResult = s.update( i, []( bool bNew, value_type& val, value_type& arg) 
                         {
                             EXPECT_FALSE( bNew );
@@ -312,7 +312,7 @@ namespace cds_test {
                         }, false );
                     EXPECT_TRUE( updResult.first );
                     EXPECT_FALSE( updResult.second );
-                    EXPECT_EQ( i.nUpdateCount, 1 );
+                    EXPECT_EQ( i.nUpdateCount, 1u );
                     break;
                 case 1:
                     EXPECT_EQ( i.nUpdateNewCount, 0 );
@@ -324,18 +324,18 @@ namespace cds_test {
                     });
                     EXPECT_TRUE( updResult.first );
                     EXPECT_TRUE( updResult.second );
-                    EXPECT_EQ( i.nUpdateNewCount, 1 );
+                    EXPECT_EQ( i.nUpdateNewCount, 1u );
                     break;
                 }
 
                 ASSERT_TRUE( s.contains( i.nKey ) == &i );
                 ASSERT_TRUE( s.contains( i ) == &i );
                 ASSERT_TRUE( s.contains( other_item( i.key() ), other_less()) == &i );
-                EXPECT_EQ( i.nFindCount, 0 );
+                EXPECT_EQ( i.nFindCount, 0u );
                 ASSERT_TRUE( s.find( i.nKey, []( value_type& v, int ) { ++v.nFindCount; } ));
-                EXPECT_EQ( i.nFindCount, 1 );
+                EXPECT_EQ( i.nFindCount, 1u );
                 ASSERT_TRUE( s.find_with( other_item( i.key() ), other_less(), []( value_type& v, other_item const& ) { ++v.nFindCount; } ));
-                EXPECT_EQ( i.nFindCount, 2 );
+                EXPECT_EQ( i.nFindCount, 2u );
             }
             ASSERT_FALSE( s.empty() );
             ASSERT_CONTAINER_SIZE( s, nSetSize );
@@ -347,23 +347,23 @@ namespace cds_test {
                 ++it->nFindCount;
             }
             for ( auto it = s.cbegin(); it != s.cend(); ++it ) {
-                EXPECT_EQ( it->nFindCount, 1 );
+                EXPECT_EQ( it->nFindCount, 1u );
             }
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nFindCount, 1 );
+                EXPECT_EQ( i.nFindCount, 1u );
             }
 
             // clear test
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 0 );
+                EXPECT_EQ( i.nDisposeCount, 0u );
             }
             s.clear();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
             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 8398ddfce96424cfdcdcdc4b5070dc5f8ddd8c0e..1cf595ec946733946762cc4c4b06051b20d02122 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:
 
@@ -172,7 +172,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelIterableMap_DHP, wrapped_stat )
@@ -192,7 +192,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index 71e37a0f904ae68d124891d3ed476c6f742d8fdc..693762aa0d6c23a2b0acb001d680ca1c1ddfcb9e 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:
 
@@ -173,7 +173,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelIterableMap_HP, wrapped_stat )
@@ -193,7 +193,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index e995945cfb2512caac2d39b533819abe5985d35b..c1ee8ed4cc65082bc73610c72d1c0175202cb738 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:
 
@@ -192,7 +192,7 @@ namespace {
 
         map_type m( kSize, 2 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelLazyMap_DHP, wrapped_stat )
@@ -213,7 +213,7 @@ namespace {
 
         map_type m( kSize, 2 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index b6db024f205c20b135d6bc1095e56dd0fb58efb0..9ec2a16fd50e6e0b1611608b9b07d4e12bd5e682 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:
 
@@ -193,7 +193,7 @@ namespace {
 
         map_type m( kSize, 2 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelLazyMap_HP, wrapped_stat )
@@ -214,7 +214,7 @@ namespace {
 
         map_type m( kSize, 2 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index 293bb78ed8b91c91335972c79bd8f3cacb396bd7..aa7d9038510a60988b9d61cc914a00711739c042 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:
 
@@ -185,7 +185,7 @@ namespace {
 
         map_type m( kSize, 4 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelLazyMap_NoGC, wrapped_stat )
@@ -207,7 +207,7 @@ namespace {
 
         map_type m( kSize, 4 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index cfd4a2b673bc355dcaaf5bcfd7ec100bb4552644..bf9b602d01b6209495d040fcb4f0aaf915676f47 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:
 
@@ -172,7 +172,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelMap_DHP, wrapped_stat )
@@ -192,7 +192,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index 4c3a7ae43fde6dbfedadc52e5ef945303397d5d5..c494e36caceed7d11efb108fa95ac4b2cb227caf 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:
 
@@ -173,7 +173,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelMap_HP, wrapped_stat )
@@ -194,7 +194,7 @@ namespace {
 
         map_type m( kSize, 8 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index b66e81b267e77c71923ae99f2ebc0a424b0dfaff..6050f002a782e10a7885fa2fb14992f8c736fc30 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:
 
@@ -164,7 +164,7 @@ namespace {
 
         map_type m( kSize, 4 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TEST_F( MichaelMap_NoGC, wrapped_stat )
@@ -186,7 +186,7 @@ namespace {
 
         map_type m( kSize, 4 );
         test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 } // namespace
index 19258b62753f0d8e47947819f885167dfbe1d99c..0bf59321a277dfa9b80376a2603c8d03606f08f5 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:
 
@@ -133,7 +133,7 @@ namespace cds_test {
                 ASSERT_TRUE( !gp );
             }
             EXPECT_TRUE( m.empty() );
-            EXPECT_CONTAINER_SIZE( m, 0 );
+            EXPECT_CONTAINER_SIZE( m, 0u );
         }
     };
 
index 7c6c2930e9a88e7a25e89cbd7ca548b83cf9ed5c..2194cd7220fbee71be40fabc2b72763852c9f87a 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:
 
@@ -224,7 +224,7 @@ namespace {
 
         map_type m( TestFixture::kSize, 4 );
         this->test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TYPED_TEST_P( MichaelLazyMap, wrapped_stat )
@@ -250,7 +250,7 @@ namespace {
 
         map_type m( TestFixture::kSize, 4 );
         this->test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
 
index 43684bdaa8e4299ae59c04086783143f7609c61d..e40a2b5ec5f35a708b519aa144506bc593580a04 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:
 
@@ -199,7 +199,7 @@ namespace {
 
         map_type m( TestFixture::kSize, 4 );
         this->test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     TYPED_TEST_P( MichaelMap, wrapped_stat )
@@ -225,7 +225,7 @@ namespace {
 
         map_type m( TestFixture::kSize, 4 );
         this->test( m );
-        EXPECT_GE( m.statistics().m_nInsertSuccess, 0 );
+        EXPECT_GE( m.statistics().m_nInsertSuccess, 0u );
     }
 
     REGISTER_TYPED_TEST_CASE_P( MichaelMap,
index 04f7d7f5519e506098c20a1793795230988264d7..1e2548e0e79e654a230ae0143aca8f99a3fbd18a 100644 (file)
@@ -225,10 +225,10 @@ namespace {
 
             for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) {
                 integral_type n = integral_type(42) << (nByte * 8);
-                EXPECT_EQ( a.exchange( n, order ), );
+                EXPECT_EQ( a.exchange( n, order ), integral_type( 0 ));
                 EXPECT_EQ( a.load( oLoad ), n );
                 EXPECT_EQ( a.exchange( (integral_type) 0, order ), n );
-                EXPECT_EQ( a.load( oLoad ), );
+                EXPECT_EQ( a.load( oLoad ), integral_type( 0 ));
             }
 
             integral_type prev = a.load( oLoad );
index a417dae891f998a7236b0b1ebbf498e367a95524..068fed12124de3d723bfc56003c551c6027821f5 100644 (file)
@@ -124,7 +124,7 @@ namespace {
 
             // pop() doesn't call disposer
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_EQ( arr[i].nDisposeCount, 0u );
+                ASSERT_EQ( arr[i].nDisposeCount, 0 );
             }
 
             // clear with disposer
@@ -139,7 +139,7 @@ namespace {
             ASSERT_EQ( q.size(), 0u );
 
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_EQ( arr[i].nDisposeCount, 1u );
+                ASSERT_EQ( arr[i].nDisposeCount, 1 );
             }
 
             // clear without disposer
@@ -151,7 +151,7 @@ namespace {
             ASSERT_EQ( q.size(), 0u );
 
             for ( size_t i = 0; i < nSize; ++i ) {
-                ASSERT_EQ( arr[i].nDisposeCount, 1u );
+                ASSERT_EQ( arr[i].nDisposeCount, 1 );
             }
         }
     };
index b5f26ac89269d105162dad4a9325848de5402e1d..850081640d7427304cc35017cf5c955283575550 100644 (file)
@@ -63,8 +63,8 @@ namespace {
         void check_array( V& arr )
         {
             for ( size_t i = 0; i < arr.size(); ++i ) {
-                EXPECT_EQ( arr[i].nDisposeCount, 2 );
-                EXPECT_EQ( arr[i].nDispose2Count, 1 );
+                EXPECT_EQ( arr[i].nDisposeCount, 2u );
+                EXPECT_EQ( arr[i].nDispose2Count, 1u );
             }
         }
     };
index 28f1153a760aaae5c60896ed04022bd0c58f0042..ff7ffa172b28380d1a807e21d3dab9c1c1d37e74 100644 (file)
@@ -107,7 +107,7 @@ namespace cds_test {
                     ASSERT_TRUE( q.pop_with( f ));
                 else
                     ASSERT_TRUE( q.dequeue_with( f ));
-                ASSERT_EQ( it, );
+                ASSERT_EQ( it, static_cast<value_type>( i ));
                 ASSERT_CONTAINER_SIZE( q, nSize - i - 1 );
             }
             ASSERT_TRUE( q.empty() );
index ca75015eebfebd277765f30dab88c6a7ac62b299..a9f20ca87d37dc2eecbf739e99d4e72992d047d4 100644 (file)
@@ -101,7 +101,7 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                 }
                 EXPECT_EQ( gp->key(), i.key() );
-                EXPECT_EQ( gp->nFindCount, i.key() * 3 );
+                EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
                 gp->nFindCount *= 2;
 
                 gp.release();
@@ -127,7 +127,7 @@ namespace cds_test {
                     break;
                 }
                 EXPECT_EQ( gp->key(), i.key() );
-                EXPECT_EQ( gp->nFindCount, i.key() * 6 );
+                EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
 
                 switch ( idx % 3 ) {
                 case 0:
index dd5b3513f53f0e64872aa5fe39c0a7f1c1d58b36..3f099fade2c7c67c531831b3bd1985636420a0ba 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.
 */
 
 #ifndef CDSUNIT_SET_TEST_SET_HP_H
@@ -76,7 +76,7 @@ namespace cds_test {
             }
 
             for ( auto it = s.cbegin(); it != s.cend(); ++it ) {
-                EXPECT_EQ( it->nFindCount, it->key() * 3 );
+                EXPECT_EQ( it->nFindCount, static_cast<size_t>( it->key() * 3 ));
             }
 
             typedef typename Set::guarded_ptr guarded_ptr;
@@ -101,7 +101,7 @@ namespace cds_test {
                     ASSERT_FALSE( !gp );
                 }
                 EXPECT_EQ( gp->key(), i.key() );
-                EXPECT_EQ( gp->nFindCount, i.key() * 3 );
+                EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 3 ));
                 gp->nFindCount *= 2;
 
                 gp.release();
@@ -127,7 +127,7 @@ namespace cds_test {
                     break;
                 }
                 EXPECT_EQ( gp->key(), i.key() );
-                EXPECT_EQ( gp->nFindCount, i.key() * 6 );
+                EXPECT_EQ( gp->nFindCount, static_cast<size_t>( i.key() * 6 ));
 
                 switch ( idx % 3 ) {
                 case 0:
index 05692fb86224280b90d2554b6dc93ee5de680b32..bddda565fef221072ca1f5747335c77b3321b13e 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 "test_intrusive_set.h"
@@ -67,7 +67,7 @@ namespace {
             ASSERT_TRUE( s.empty() );
             ASSERT_CONTAINER_SIZE( s, 0 );
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
         }
index 5fb4a0430edcb3cef338e137214d6a73b285bc5d..fed3e069a40fd3e1c825c849771acf13df42f7ca 100644 (file)
@@ -199,7 +199,7 @@ namespace {
                     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:
@@ -208,7 +208,7 @@ namespace {
                     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:
@@ -310,10 +310,10 @@ namespace {
                 } ));
                 ASSERT_TRUE( s.find( i, []( value_type& v, value_type const& )
                 {
-                    EXPECT_EQ( ++v.nFindCount, 2 );
+                    EXPECT_EQ( ++v.nFindCount, 2u );
                 } ));
                 ASSERT_TRUE( (call_find_with< c_hasFindWith, Set >()(s, i.key(), []( value_type& v, other_item const& ) {
-                    EXPECT_EQ( ++v.nFindCount, 3 );
+                    EXPECT_EQ( ++v.nFindCount, 3u );
                 })));
 
                 int nKey = i.key() - 1;
@@ -382,7 +382,7 @@ namespace {
                 ASSERT_FALSE( (call_find_with<c_hasFindWith, Set>()( s, i.key(), []( value_type&, other_item const& ) {})));
             }
             ASSERT_TRUE( s.empty() );
-            ASSERT_CONTAINER_SIZE( s, 0 );
+            ASSERT_CONTAINER_SIZE( s, 0u );
 
 
             // clear
@@ -396,7 +396,7 @@ namespace {
             s.clear();
 
             ASSERT_TRUE( s.empty() );
-            ASSERT_CONTAINER_SIZE( s, 0 );
+            ASSERT_CONTAINER_SIZE( s, 0u );
         }
 
     };