Fixed minor gcc warnings
authorkhizmax <libcds.dev@gmail.com>
Tue, 27 Sep 2016 17:34:35 +0000 (20:34 +0300)
committerkhizmax <libcds.dev@gmail.com>
Tue, 27 Sep 2016 17:34:35 +0000 (20:34 +0300)
22 files changed:
test/stress/map/insdel_func/map_insdel_func.h
test/stress/map/insfind_int/map_insfind_int.h
test/stress/pqueue/pop.cpp
test/stress/pqueue/push.cpp
test/stress/pqueue/push_pop.cpp
test/stress/queue/bounded_queue_fulness.cpp
test/stress/queue/intrusive_push_pop.cpp
test/stress/queue/push.cpp
test/stress/queue/push_pop.cpp
test/stress/queue/random.cpp
test/stress/set/delodd/set_delodd.h
test/stress/stack/intrusive_stack_push_pop.h
test/stress/stack/push.cpp
test/stress/stack/push_pop.cpp
test/unit/map/skiplist_nogc.cpp
test/unit/queue/intrusive_segmented_queue_dhp.cpp
test/unit/set/test_set.h
test/unit/set/test_set_nogc.h
test/unit/set/test_set_rcu.h
test/unit/tree/test_intrusive_tree_hp.h
test/unit/tree/test_intrusive_tree_rcu.h
test/unit/tree/test_tree_set_rcu.h

index 07a920df7f6202a275174135c45c7c4deb45d244..856bdcd78e2b219150492fc78d230dfdd3ae72e0 100644 (file)
@@ -503,9 +503,9 @@ namespace map {
                 << std::make_pair( "update_functor_modify", nEnsFuncModified )
                 << std::make_pair( "finish_map_size", testMap.size() );
 
-            EXPECT_EQ( nDelValueFailed, 0 );
+            EXPECT_EQ( nDelValueFailed, 0u );
             EXPECT_EQ( nDelValueSuccess, nDeleteSuccess );
-            EXPECT_EQ( nUpdateFailed, 0 );
+            EXPECT_EQ( nUpdateFailed, 0u );
             EXPECT_EQ( nUpdateCreated + nUpdateModified, nEnsFuncCreated + nEnsFuncModified );
 
             // nInsFuncCalled is call count of insert functor
index 048309e74f397719421af24e0cfbc256e8a6b685..7b97aed61e45a0097642c5783b862e18d643f44e 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"
@@ -157,8 +157,8 @@ namespace map {
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 inserter& thr = static_cast<inserter&>(pool.get( i ));
 
-                EXPECT_EQ( thr.m_nInsertFailed, 0 ) << "thread " << thr.id();
-                EXPECT_EQ( thr.m_nFindFail, 0 ) << "thread " << thr.id();
+                EXPECT_EQ( thr.m_nInsertFailed, 0u ) << "thread " << thr.id();
+                EXPECT_EQ( thr.m_nFindFail, 0u ) << "thread " << thr.id();
 
                 nInsertSuccess += thr.m_nInsertSuccess;
                 nInsertFailed += thr.m_nInsertFailed;
@@ -173,8 +173,8 @@ namespace map {
                 << std::make_pair( "find_failed", nFindFailed )
                 << std::make_pair( "finish_map_size", testMap.size() );
 
-            EXPECT_EQ( nInsertFailed, 0 );
-            EXPECT_EQ( nFindFailed, 0 );
+            EXPECT_EQ( nInsertFailed, 0u );
+            EXPECT_EQ( nFindFailed, 0u );
 
             check_before_cleanup( testMap );
 
index 4031474742e91b754c94a9447a395ab31098057f..89b0241fe6d172ecb79c6ecb1c7eebf29bff82a0 100644 (file)
@@ -177,8 +177,8 @@ namespace {
                     << std::make_pair( "error_priority_violation", nTotalError );
 
                 EXPECT_EQ( nTotalPopped, s_nQueueSize );
-                EXPECT_EQ( nTotalError, 0 ) << "priority violations";
-                EXPECT_EQ( nTotalErrorEq, 0 ) << "double key";
+                EXPECT_EQ( nTotalError, 0u ) << "priority violations";
+                EXPECT_EQ( nTotalErrorEq, 0u ) << "double key";
             }
 
             propout() << q.statistics();
@@ -192,9 +192,9 @@ namespace {
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
index 95e23aa0cd0a94a8765bc5e393677257608944c9..eb5b0813b6cf5e3560c2572ed1ce238be1db9df7 100644 (file)
@@ -94,7 +94,7 @@ namespace pqueue {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 Producer<PQueue>& prod = static_cast<Producer<PQueue>&>(pool.get( i ));
-                EXPECT_EQ( prod.m_nPushError, 0 ) << "producer=" << i;
+                EXPECT_EQ( prod.m_nPushError, 0u ) << "producer=" << i;
             }
             EXPECT_FALSE( q.empty());
 
@@ -153,9 +153,9 @@ namespace pqueue {
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
index 3078a666605250e5ad27bdf791755b3edf8db78a..f1df9d64fabf64d1c5124a717a03fcd7348fa7be 100644 (file)
@@ -181,7 +181,7 @@ namespace {
                     assert( t.type() == producer_thread );
                     Producer<PQueue>& prod = static_cast<Producer<PQueue>&>(t);
                     nPushFailed += prod.m_nPushError;
-                    EXPECT_EQ( prod.m_nPushError , 0 ) << "producer " << i;
+                    EXPECT_EQ( prod.m_nPushError , 0u ) << "producer " << i;
                 }
             }
 
@@ -190,7 +190,7 @@ namespace {
                 << std::make_pair( "push_error", nPushFailed );
 
             EXPECT_EQ( nTotalPopped, s_nQueueSize );
-            EXPECT_EQ( nPushFailed, 0 );
+            EXPECT_EQ( nPushFailed, 0u );
 
             //check_statistics( testQueue.statistics() );
             propout() << q.statistics();
@@ -205,11 +205,11 @@ namespace {
             s_nPopThreadCount = cfg.get_size_t( "PopThreadCount", s_nPopThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nPushThreadCount == 0 )
+            if ( s_nPushThreadCount == 0u )
                 s_nPushThreadCount = 1;
-            if ( s_nPopThreadCount == 0 )
+            if ( s_nPopThreadCount == 0u )
                 s_nPopThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
index fbae332e874e754a0348b6d5999c1f8b28abfe68..d133fa069eab5713b4d81c7d30a2b544d5f1e66f 100644 (file)
@@ -94,11 +94,11 @@ namespace {
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
             s_nPassCount = cfg.get_size_t( "PassCount", s_nPassCount );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1024;
-            if ( s_nPassCount == 0 )
+            if ( s_nPassCount == 0u )
                 s_nPassCount = 1;
         }
 
@@ -118,8 +118,8 @@ namespace {
                 nPopError  += strain.m_nPopError;
             }
             EXPECT_TRUE( !q.empty());
-            EXPECT_EQ( nPushError, 0 );
-            EXPECT_EQ( nPopError, 0 );
+            EXPECT_EQ( nPushError, 0u );
+            EXPECT_EQ( nPopError, 0u );
         }
 
         template <class Queue>
index 33640dbedebbceb018c83b0146715012d4da6e8f..389f70d7d2d20b465f9abefcc6868bf06f0da728 100644 (file)
@@ -206,11 +206,11 @@ namespace {
             s_nFCPassCount = cfg.get_uint( "FCPassCount", s_nFCPassCount );
             s_nFCCompactFactor = cfg.get_uint( "FCCompactFactor", s_nFCCompactFactor );
 
-            if ( s_nReaderThreadCount == 0 )
+            if ( s_nReaderThreadCount == 0u )
                 s_nReaderThreadCount = 1;
-            if ( s_nWriterThreadCount == 0 )
+            if ( s_nWriterThreadCount == 0u )
                 s_nWriterThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
@@ -352,7 +352,7 @@ namespace {
                     if ( it->nConsumer == c_nBadConsumer )
                         ++nBadConsumerCount;
                 }
-                EXPECT_EQ( nBadConsumerCount, 0 );
+                EXPECT_EQ( nBadConsumerCount, 0u );
             }
 
             analyze( q, nLeftOffset, nRightOffset );
index f9ba12165dcb0291665aa05f702f9aaf6205cccd..ed4963f890b677e067cad231169ea931a18d93ac 100644 (file)
@@ -102,9 +102,9 @@ namespace {
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
@@ -148,7 +148,7 @@ namespace {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 Producer<Queue>& thread = static_cast<Producer<Queue>&>(pool.get( i ));
-                EXPECT_EQ( thread.m_nPushError, 0 ) << " producer thread " << i;
+                EXPECT_EQ( thread.m_nPushError, 0u ) << " producer thread " << i;
             }
             EXPECT_TRUE( !q.empty() );
 
index 409db3105939895cd8ac34cf1b3eb6d120a650fc..7c3ff6f442d794cac4fd052b8de41fb697edcc8b 100644 (file)
@@ -219,7 +219,7 @@ namespace {
                     nTotalPops += consumer.m_nPopped;
                     nPopFalse += consumer.m_nPopEmpty;
                     arrConsumer.push_back( &consumer );
-                    EXPECT_EQ( consumer.m_nBadWriter, 0 ) << "consumer_thread_no " << i;
+                    EXPECT_EQ( consumer.m_nBadWriter, 0u ) << "consumer_thread_no " << i;
 
                     size_t nPopped = 0;
                     for ( size_t n = 0; n < s_nProducerThreadCount; ++n )
@@ -307,11 +307,11 @@ namespace {
             s_nProducerThreadCount = cfg.get_size_t( "ProducerCount", s_nProducerThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nConsumerThreadCount == 0 )
+            if ( s_nConsumerThreadCount == 0u )
                 s_nConsumerThreadCount = 1;
-            if ( s_nProducerThreadCount == 0 )
+            if ( s_nProducerThreadCount == 0u )
                 s_nProducerThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
index bdd154a51d7b823b446c668589356d90a39b0a95..1094d82e0dff434f07c48a2febebe74da2f50c21 100644 (file)
@@ -168,9 +168,9 @@ namespace {
             s_nThreadCount = cfg.get_size_t( "ThreadCount", s_nThreadCount );
             s_nQueueSize = cfg.get_size_t( "QueueSize", s_nQueueSize );
 
-            if ( s_nThreadCount == 0 )
+            if ( s_nThreadCount == 0u )
                 s_nThreadCount = 1;
-            if ( s_nQueueSize == 0 )
+            if ( s_nQueueSize == 0u )
                 s_nQueueSize = 1000;
         }
 
@@ -192,9 +192,9 @@ namespace {
             cds_test::thread_pool& pool = get_pool();
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 Strain<Queue>& thr = static_cast<Strain<Queue> &>( pool.get(i));
-                EXPECT_EQ( thr.m_nUndefWriter, 0 );
-                EXPECT_EQ( thr.m_nRepeatValue, 0 );
-                EXPECT_EQ( thr.m_nPushError, 0 );
+                EXPECT_EQ( thr.m_nUndefWriter, 0u );
+                EXPECT_EQ( thr.m_nRepeatValue, 0u );
+                EXPECT_EQ( thr.m_nPushError, 0u );
                 nPushError += thr.m_nPushError;
 
                 arrPushCount[ thr.id() ] += thr.m_nPushCount;
index 5d8df8aab5dac16c70349a12005421b92b4e5450..97007851bbbf92a654a8efb5c02dd4c7857bd67d 100644 (file)
@@ -599,7 +599,7 @@ namespace set {
             }
 
             EXPECT_EQ( nInsertSuccess, s_nSetSize * s_nInsThreadCount );
-            EXPECT_EQ( nInsertFailed, 0 );
+            EXPECT_EQ( nInsertFailed, 0u );
 
             propout()
                 << std::make_pair( "insert_success", nInsertSuccess )
@@ -669,7 +669,7 @@ namespace set {
             }
 
             EXPECT_EQ( nInsertSuccess, s_nSetSize * s_nInsThreadCount );
-            EXPECT_EQ( nInsertFailed, 0 );
+            EXPECT_EQ( nInsertFailed, 0u );
 
             propout()
                 << std::make_pair( "insert_success", nInsertSuccess )
index 4c7804ca57f31690229df8470c38d27a605262ba..28adf8a7e488598613d5f59540ab7f4c81e1c171 100644 (file)
@@ -230,8 +230,8 @@ namespace cds_test {
             }
 
             EXPECT_EQ( nPopCount, s_nStackSize );
-            EXPECT_EQ( nDirtyPop, 0 );
-            EXPECT_EQ( nPushError, 0 );
+            EXPECT_EQ( nDirtyPop, 0u );
+            EXPECT_EQ( nPushError, 0u );
 
             for ( size_t i = 0; i < sizeof( arrVal ) / sizeof( arrVal[0] ); ++i ) {
                 EXPECT_EQ( arrVal[i], 0 ) << "i=" << i;
index 8fd5f19bd3a1fd083d0ca3d222a9580dbe662368..6ef3dee09ae2a821963209b91856add1d3ecc236 100644 (file)
@@ -167,7 +167,7 @@ namespace {
 
             for ( size_t i = 0; i < pool.size(); ++i ) {
                 Producer<Stack>& producer = static_cast<Producer<Stack>&>( pool.get( i ));
-                EXPECT_EQ( producer.m_nPushError, 0 ) << "Producer=" << i;
+                EXPECT_EQ( producer.m_nPushError, 0u ) << "Producer=" << i;
                 aThread[producer.id()] = producer.m_nEndItem - 1;
             }
             EXPECT_FALSE( testStack.empty());
index 1c0654a180b1c09090f83222cc35fea03be4b3d3..ad3dd6762445ca5cffc80d25ec984a07a99459d0 100644 (file)
@@ -263,7 +263,7 @@ namespace {
             }
 
             EXPECT_EQ( nPopCount, s_nStackSize );
-            EXPECT_EQ( nDirtyPop, 0 );
+            EXPECT_EQ( nDirtyPop, 0u );
 
             for ( size_t i = 0; i < sizeof( arrVal ) / sizeof( arrVal[0] ); ++i ) {
                 EXPECT_EQ( arrVal[i], 0 );
index a2f7957285d6599a012e652e62f26aff980bf6a2..47fa0fdd0b97dfb5786c3f40c1200f15f09d3a9f 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_map_nogc.h"
@@ -65,7 +65,7 @@ namespace {
 
                 p = m.get_max();
                 ASSERT_TRUE( p != nullptr );
-                EXPECT_EQ( p->first.nKey, kkSize );
+                EXPECT_EQ( p->first.nKey, static_cast<int>( kkSize ));
             }
 
             m.clear();
index 51d93e07cb8f979a694615524ef585e5a62fe137..5e7d25d3ae7a5ec3aa5884ea4d08538681f89eaf 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 6ccc966650b6c2f549ed14e0a610a8489f8b5d98..af88b5b58b4ea75287ca4b13d2e1537db630eacf 100644 (file)
@@ -146,7 +146,7 @@ namespace cds_test {
                     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:
@@ -171,7 +171,7 @@ namespace cds_test {
                     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:
index 8fbcbdfbb9c525c63070b26f366e0529ff1cccc2..ef4567c7fcb80b36d96dc1f5242f5bdbe7178a69 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_NOGC_H
@@ -315,7 +315,7 @@ namespace cds_test {
 
                 it = s.contains( i.nKey );
                 ASSERT_TRUE( it != s.end() );
-                EXPECT_EQ( it->nFindCount, it->nKey );
+                EXPECT_EQ( it->nFindCount, static_cast<unsigned>( it->nKey ));
                 ASSERT_TRUE( s.contains( i ) != s.end() );
                 ASSERT_TRUE( s.contains( other_item( i.key() ), other_less() ) != s.end());
             }
@@ -329,7 +329,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<unsigned>( it->key() * 3 ));
             }
 
             // clear
index 9f720d90e92d791a1bd359d47517b21836003c95..876972ac4d2f4beb9b74995e0c4e4450fdd001cd 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_RCU_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<unsigned>( it->key() * 3 ));
             }
 
             typedef typename Set::exempt_ptr exempt_ptr;
@@ -105,7 +105,7 @@ namespace cds_test {
                         ASSERT_FALSE( !rp );
                     }
                     EXPECT_EQ( rp->key(), i.key() );
-                    EXPECT_EQ( rp->nFindCount, i.key() * 3 );
+                    EXPECT_EQ( rp->nFindCount, static_cast<unsigned>( i.key() * 3 ));
                     rp->nFindCount *= 2;
                 }
             }
@@ -135,7 +135,7 @@ namespace cds_test {
                             break;
                         }
                         EXPECT_EQ( xp->key(), i.key() );
-                        EXPECT_EQ( xp->nFindCount, i.key() * 6 );
+                        EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 6 ));
                     }
                     xp.release();
 
@@ -172,7 +172,7 @@ namespace cds_test {
                         break;
                     }
                     EXPECT_EQ( xp->key(), i.key() );
-                    EXPECT_EQ( xp->nFindCount, i.key() * 6 );
+                    EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 6 ));
 
                     switch ( idx % 3 ) {
                     case 0:
index 0b350c974a730dd59ecc2ecfbd7697e8c87dac28..07a1762ecff6100858ed42ffbdf0c35d3c7171f9 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_TREE_TEST_INTRUSIVE_TREE_HP_H
@@ -106,23 +106,23 @@ namespace cds_test {
             for ( auto idx : indices ) {
                 auto& i = data[idx];
 
-                EXPECT_EQ( i.nFindCount, 0 );
+                EXPECT_EQ( i.nFindCount, 0u );
                 gp = t.get( i );
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
-                EXPECT_EQ( i.nFindCount, 1 );
+                EXPECT_EQ( i.nFindCount, 1u );
 
                 gp = t.get( i.key() );
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
-                EXPECT_EQ( i.nFindCount, 2 );
+                EXPECT_EQ( i.nFindCount, 2u );
 
                 gp = t.get_with( other_item( i.key()), other_less());
                 ASSERT_FALSE( !gp );
                 ++gp->nFindCount;
-                EXPECT_EQ( i.nFindCount, 3 );
+                EXPECT_EQ( i.nFindCount, 3u );
 
-                EXPECT_EQ( i.nEraseCount, 0 );
+                EXPECT_EQ( i.nEraseCount, 0u );
                 switch ( i.key() % 3 ) {
                 case 0:
                     gp = t.extract( i.key());
@@ -136,7 +136,7 @@ namespace cds_test {
                 }
                 ASSERT_FALSE( !gp );
                 ++gp->nEraseCount;
-                EXPECT_EQ( i.nEraseCount, 1 );
+                EXPECT_EQ( i.nEraseCount, 1u );
 
                 gp = t.extract( i );
                 ASSERT_TRUE( !gp );
@@ -149,12 +149,12 @@ namespace cds_test {
             gp.release();
 
             ASSERT_TRUE( t.empty() );
-            ASSERT_CONTAINER_SIZE( t, 0 );
+            ASSERT_CONTAINER_SIZE( t, 0u );
 
             // Force retiring cycle
             Tree::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
             // extract_min
@@ -175,13 +175,13 @@ namespace cds_test {
             }
             gp.release();
             ASSERT_TRUE( t.empty() );
-            ASSERT_CONTAINER_SIZE( t, 0 );
+            ASSERT_CONTAINER_SIZE( t, 0u );
             EXPECT_EQ( nCount, data.size() );
 
             // Force retiring cycle
             Tree::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
             // extract_max
@@ -202,13 +202,13 @@ namespace cds_test {
             }
             gp.release();
             ASSERT_TRUE( t.empty() );
-            ASSERT_CONTAINER_SIZE( t, 0 );
+            ASSERT_CONTAINER_SIZE( t, 0u );
             EXPECT_EQ( nCount, data.size() );
 
             // Force retiring cycle
             Tree::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
         }
index ceca126d06a3aabb79954cdac7be30543e64b84b..8f1eb99cebd23dab3d7527df6bf39e6a09bf7d6e 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_TREE_TEST_INTRUSIVE_TREE_RCU_H
@@ -116,24 +116,24 @@ namespace cds_test {
                     rcu_lock l;
 
                     value_type * p;
-                    EXPECT_EQ( i.nFindCount, 0 );
+                    EXPECT_EQ( i.nFindCount, 0u );
                     p = t.get( i );
                     ASSERT_FALSE( !p );
                     ++p->nFindCount;
-                    EXPECT_EQ( i.nFindCount, 1 );
+                    EXPECT_EQ( i.nFindCount, 1u );
 
                     p = t.get( i.key() );
                     ASSERT_FALSE( !p );
                     ++p->nFindCount;
-                    EXPECT_EQ( i.nFindCount, 2 );
+                    EXPECT_EQ( i.nFindCount, 2u );
 
                     p = t.get_with( other_item( i.key() ), other_less() );
                     ASSERT_FALSE( !p );
                     ++p->nFindCount;
-                    EXPECT_EQ( i.nFindCount, 3 );
+                    EXPECT_EQ( i.nFindCount, 3u );
                 }
 
-                EXPECT_EQ( i.nEraseCount, 0 );
+                EXPECT_EQ( i.nEraseCount, 0u );
                 switch ( i.key() % 3 ) {
                 case 0:
                     xp = t.extract( i.key());
@@ -147,7 +147,7 @@ namespace cds_test {
                 }
                 ASSERT_FALSE( !xp );
                 ++xp->nEraseCount;
-                EXPECT_EQ( i.nEraseCount, 1 );
+                EXPECT_EQ( i.nEraseCount, 1u );
 
                 xp = t.extract( i );
                 ASSERT_TRUE( !xp );
@@ -158,12 +158,12 @@ namespace cds_test {
             }
 
             ASSERT_TRUE( t.empty() );
-            ASSERT_CONTAINER_SIZE( t, 0 );
+            ASSERT_CONTAINER_SIZE( t, 0u );
 
             // Force retiring cycle
             Tree::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
             // extract_min
@@ -184,13 +184,13 @@ namespace cds_test {
             }
             xp.release();
             ASSERT_TRUE( t.empty() );
-            ASSERT_CONTAINER_SIZE( t, 0 );
+            ASSERT_CONTAINER_SIZE( t, 0u );
             EXPECT_EQ( nCount, data.size() );
 
             // Force retiring cycle
             Tree::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
 
             // extract_max
@@ -211,13 +211,13 @@ namespace cds_test {
             }
             xp.release();
             ASSERT_TRUE( t.empty() );
-            ASSERT_CONTAINER_SIZE( t, 0 );
+            ASSERT_CONTAINER_SIZE( t, 0u );
             EXPECT_EQ( nCount, data.size() );
 
             // Force retiring cycle
             Tree::gc::force_dispose();
             for ( auto& i : data ) {
-                EXPECT_EQ( i.nDisposeCount, 1 );
+                EXPECT_EQ( i.nDisposeCount, 1u );
             }
         }
     };
index e6f9ddaffbf9ae1fcda7a69c8d1510baf3e25f2d..43845867f091b93ec0eae3e1fcd2e2d4bcbe4ea9 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_TREE_TEST_TREE_SET_RCU_H
@@ -125,7 +125,7 @@ namespace cds_test {
                             break;
                         }
                         EXPECT_EQ( xp->key(), i.key() );
-                        EXPECT_EQ( xp->nFindCount, i.key() * 3 );
+                        EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 3 ));
                     }
                     xp.release();
 
@@ -162,7 +162,7 @@ namespace cds_test {
                         break;
                     }
                     EXPECT_EQ( xp->key(), i.key() );
-                    EXPECT_EQ( xp->nFindCount, i.key() * 3 );
+                    EXPECT_EQ( xp->nFindCount, static_cast<unsigned>( i.key() * 3 ));
 
                     switch ( idx % 3 ) {
                     case 0: