From 4c6eb072f7c8e857b69f1f63b51a17ec6974076e Mon Sep 17 00:00:00 2001 From: khizmax Date: Mon, 26 Sep 2016 22:31:25 +0300 Subject: [PATCH] Fixed minor gcc warnings --- cds/container/impl/iterable_kvlist.h | 2 +- cds/container/impl/iterable_list.h | 2 +- cds/container/michael_map.h | 2 +- cds/intrusive/details/iterable_list_base.h | 4 +-- cds/intrusive/details/michael_set_base.h | 2 +- cds/intrusive/impl/iterable_list.h | 2 +- cds/intrusive/michael_set.h | 2 +- projects/Win/vc14/gtest-misc.vcxproj.filters | 4 --- projects/Win/vc14/gtest-set.vcxproj.filters | 4 --- .../vc14/gtest-striped-set.vcxproj.filters | 4 --- .../vc14/stress-map-delodd.vcxproj.filters | 4 --- .../vc14/stress-map-find_int.vcxproj.filters | 4 --- .../stress-map-find_string.vcxproj.filters | 4 --- .../stress-map-insdel-func.vcxproj.filters | 4 --- .../stress-map-insdel-int.vcxproj.filters | 4 --- ...stress-map-insdel-item-int.vcxproj.filters | 4 --- .../stress-map-insdel-string.vcxproj.filters | 4 --- .../stress-map-insdelfind.vcxproj.filters | 4 --- .../stress-map-insfind-int.vcxproj.filters | 4 --- test/include/cds_test/check_size.h | 4 +-- test/stress/map/insdel_func/map_insdel_func.h | 5 ++-- .../intrusive_michael_lazy_dhp.cpp | 10 +++---- .../intrusive_michael_lazy_hp.cpp | 10 +++---- .../intrusive_michael_lazy_nogc.cpp | 10 +++---- .../intrusive_michael_michael_dhp.cpp | 10 +++---- .../intrusive_michael_michael_hp.cpp | 10 +++---- .../intrusive_michael_michael_nogc.cpp | 10 +++---- .../test_intrusive_feldman_hashset.h | 28 ++++++++--------- .../test_intrusive_michael_iterable.h | 30 +++++++++---------- test/unit/misc/bitop.cpp | 20 ++++++------- test/unit/misc/cxx11_atomic_class.cpp | 6 ++-- test/unit/pqueue/test_fcpqueue.h | 6 ++-- test/unit/queue/fcqueue.cpp | 2 +- test/unit/queue/test_bounded_queue.h | 10 +++---- test/unit/queue/test_generic_queue.h | 2 +- test/unit/set/michael_iterable_dhp.cpp | 6 ++-- test/unit/set/michael_iterable_hp.cpp | 6 ++-- test/unit/set/michael_lazy_dhp.cpp | 6 ++-- test/unit/set/michael_lazy_hp.cpp | 6 ++-- test/unit/set/michael_lazy_nogc.cpp | 6 ++-- test/unit/set/michael_michael_dhp.cpp | 6 ++-- test/unit/set/michael_michael_hp.cpp | 6 ++-- test/unit/set/michael_michael_nogc.cpp | 6 ++-- test/unit/set/test_feldman_hashset.h | 2 +- test/unit/set/test_feldman_hashset_hp.h | 10 +++---- test/unit/set/test_feldman_hashset_rcu.h | 4 +-- test/unit/striped-set/test_intrusive_set.h | 6 ++-- test/unit/striped-set/test_set.h | 16 +++++----- 48 files changed, 138 insertions(+), 185 deletions(-) diff --git a/cds/container/impl/iterable_kvlist.h b/cds/container/impl/iterable_kvlist.h index e0a1308b..ece70283 100644 --- a/cds/container/impl/iterable_kvlist.h +++ b/cds/container/impl/iterable_kvlist.h @@ -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: diff --git a/cds/container/impl/iterable_list.h b/cds/container/impl/iterable_list.h index e32f8945..ae058609 100644 --- a/cds/container/impl/iterable_list.h +++ b/cds/container/impl/iterable_list.h @@ -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: diff --git a/cds/container/michael_map.h b/cds/container/michael_map.h index f0cd8597..6c67eb30 100644 --- a/cds/container/michael_map.h +++ b/cds/container/michael_map.h @@ -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: diff --git a/cds/intrusive/details/iterable_list_base.h b/cds/intrusive/details/iterable_list_base.h index 381a28a2..198b5d59 100644 --- a/cds/intrusive/details/iterable_list_base.h +++ b/cds/intrusive/details/iterable_list_base.h @@ -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: @@ -190,7 +190,7 @@ namespace cds { namespace intrusive { typedef empty_stat stat; /// Item counting feature; by default, disabled. Use \p cds::atomicity::item_counter to enable item counting - typedef atomicity::empty_item_counter item_counter; + typedef atomicity::empty_item_counter item_counter; /// C++ memory ordering model /** diff --git a/cds/intrusive/details/michael_set_base.h b/cds/intrusive/details/michael_set_base.h index bc8490e7..aa135fdf 100644 --- a/cds/intrusive/details/michael_set_base.h +++ b/cds/intrusive/details/michael_set_base.h @@ -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: diff --git a/cds/intrusive/impl/iterable_list.h b/cds/intrusive/impl/iterable_list.h index cbb76352..a05ae6cd 100644 --- a/cds/intrusive/impl/iterable_list.h +++ b/cds/intrusive/impl/iterable_list.h @@ -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: diff --git a/cds/intrusive/michael_set.h b/cds/intrusive/michael_set.h index 1f396855..532ac4de 100644 --- a/cds/intrusive/michael_set.h +++ b/cds/intrusive/michael_set.h @@ -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: diff --git a/projects/Win/vc14/gtest-misc.vcxproj.filters b/projects/Win/vc14/gtest-misc.vcxproj.filters index 37266bf6..6318a602 100644 --- a/projects/Win/vc14/gtest-misc.vcxproj.filters +++ b/projects/Win/vc14/gtest-misc.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/gtest-set.vcxproj.filters b/projects/Win/vc14/gtest-set.vcxproj.filters index 4fe9b8d8..c7b8eb7f 100644 --- a/projects/Win/vc14/gtest-set.vcxproj.filters +++ b/projects/Win/vc14/gtest-set.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - {4c75be9d-6104-435d-b08f-09fa33b2bfcc} diff --git a/projects/Win/vc14/gtest-striped-set.vcxproj.filters b/projects/Win/vc14/gtest-striped-set.vcxproj.filters index e0f5f7e4..2b7c7c59 100644 --- a/projects/Win/vc14/gtest-striped-set.vcxproj.filters +++ b/projects/Win/vc14/gtest-striped-set.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-delodd.vcxproj.filters b/projects/Win/vc14/stress-map-delodd.vcxproj.filters index 19954da4..82bb7268 100644 --- a/projects/Win/vc14/stress-map-delodd.vcxproj.filters +++ b/projects/Win/vc14/stress-map-delodd.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-find_int.vcxproj.filters b/projects/Win/vc14/stress-map-find_int.vcxproj.filters index 86d671df..4ae67ebe 100644 --- a/projects/Win/vc14/stress-map-find_int.vcxproj.filters +++ b/projects/Win/vc14/stress-map-find_int.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-find_string.vcxproj.filters b/projects/Win/vc14/stress-map-find_string.vcxproj.filters index 4d4f2b62..1a17e3bc 100644 --- a/projects/Win/vc14/stress-map-find_string.vcxproj.filters +++ b/projects/Win/vc14/stress-map-find_string.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-insdel-func.vcxproj.filters b/projects/Win/vc14/stress-map-insdel-func.vcxproj.filters index 05f85641..1a3164fa 100644 --- a/projects/Win/vc14/stress-map-insdel-func.vcxproj.filters +++ b/projects/Win/vc14/stress-map-insdel-func.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-insdel-int.vcxproj.filters b/projects/Win/vc14/stress-map-insdel-int.vcxproj.filters index 6d2e3029..8a250daa 100644 --- a/projects/Win/vc14/stress-map-insdel-int.vcxproj.filters +++ b/projects/Win/vc14/stress-map-insdel-int.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-insdel-item-int.vcxproj.filters b/projects/Win/vc14/stress-map-insdel-item-int.vcxproj.filters index 76b18d06..4ef82f69 100644 --- a/projects/Win/vc14/stress-map-insdel-item-int.vcxproj.filters +++ b/projects/Win/vc14/stress-map-insdel-item-int.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters b/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters index b2a3f674..46a38802 100644 --- a/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters +++ b/projects/Win/vc14/stress-map-insdel-string.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-insdelfind.vcxproj.filters b/projects/Win/vc14/stress-map-insdelfind.vcxproj.filters index 7ad17bf3..f9cd9705 100644 --- a/projects/Win/vc14/stress-map-insdelfind.vcxproj.filters +++ b/projects/Win/vc14/stress-map-insdelfind.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters b/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters index 4cf63931..da30273c 100644 --- a/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters +++ b/projects/Win/vc14/stress-map-insfind-int.vcxproj.filters @@ -9,10 +9,6 @@ {93995380-89BD-4b04-88EB-625FBE52EBFB} h;hh;hpp;hxx;hm;inl;inc;xsd - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - diff --git a/test/include/cds_test/check_size.h b/test/include/cds_test/check_size.h index 34a3b990..c72feb00 100644 --- a/test/include/cds_test/check_size.h +++ b/test/include/cds_test/check_size.h @@ -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 CDSTEST_CHECK_SIZE_H diff --git a/test/stress/map/insdel_func/map_insdel_func.h b/test/stress/map/insdel_func/map_insdel_func.h index ab963779..d4f282da 100644 --- a/test/stress/map/insdel_func/map_insdel_func.h +++ b/test/stress/map/insdel_func/map_insdel_func.h @@ -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: @@ -227,7 +227,7 @@ namespace map { operator()( bNew, val.first, val.second ); } - // For FeldmanHashMap + // For FeldmanHashMap, IterableList template void operator()( Val& cur, Val * old ) { @@ -517,6 +517,7 @@ namespace map { testMap.erase( nItem ); EXPECT_TRUE( testMap.empty()); + EXPECT_TRUE( testMap.size(), 0u ); additional_check( testMap ); print_stat( propout(), testMap ); diff --git a/test/unit/intrusive-set/intrusive_michael_lazy_dhp.cpp b/test/unit/intrusive-set/intrusive_michael_lazy_dhp.cpp index e4a6abaa..835611b2 100644 --- a/test/unit/intrusive-set/intrusive_michael_lazy_dhp.cpp +++ b/test/unit/intrusive-set/intrusive_michael_lazy_dhp.cpp @@ -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: @@ -178,7 +178,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_DHP, base_wrapped_stat ) @@ -201,7 +201,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_DHP, member_cmp ) @@ -316,7 +316,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_DHP, member_wrapped_stat ) @@ -339,7 +339,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/intrusive-set/intrusive_michael_lazy_hp.cpp b/test/unit/intrusive-set/intrusive_michael_lazy_hp.cpp index 5a833357..89c31984 100644 --- a/test/unit/intrusive-set/intrusive_michael_lazy_hp.cpp +++ b/test/unit/intrusive-set/intrusive_michael_lazy_hp.cpp @@ -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: @@ -179,7 +179,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_HP, base_wrapped_stat ) @@ -202,7 +202,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } @@ -318,7 +318,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_HP, member_wrapped_stat ) @@ -341,7 +341,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/intrusive-set/intrusive_michael_lazy_nogc.cpp b/test/unit/intrusive-set/intrusive_michael_lazy_nogc.cpp index 52cc7614..4d86b559 100644 --- a/test/unit/intrusive-set/intrusive_michael_lazy_nogc.cpp +++ b/test/unit/intrusive-set/intrusive_michael_lazy_nogc.cpp @@ -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: @@ -165,7 +165,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_NoGC, base_wrapped_stat ) @@ -188,7 +188,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_NoGC, member_cmp ) @@ -303,7 +303,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelLazySet_NoGC, member_wrapped_stat ) @@ -326,7 +326,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/intrusive-set/intrusive_michael_michael_dhp.cpp b/test/unit/intrusive-set/intrusive_michael_michael_dhp.cpp index 238705e6..fe2d6e8d 100644 --- a/test/unit/intrusive-set/intrusive_michael_michael_dhp.cpp +++ b/test/unit/intrusive-set/intrusive_michael_michael_dhp.cpp @@ -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: @@ -152,7 +152,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_DHP, base_wrapped_stat ) @@ -176,7 +176,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_DHP, member_cmp ) @@ -270,7 +270,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_DHP, member_wrapped_stat ) @@ -294,7 +294,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/intrusive-set/intrusive_michael_michael_hp.cpp b/test/unit/intrusive-set/intrusive_michael_michael_hp.cpp index 9c2a3b8f..e043cece 100644 --- a/test/unit/intrusive-set/intrusive_michael_michael_hp.cpp +++ b/test/unit/intrusive-set/intrusive_michael_michael_hp.cpp @@ -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: @@ -153,7 +153,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_HP, base_wrapped_stat ) @@ -176,7 +176,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_HP, member_cmp ) @@ -270,7 +270,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_HP, member_wrapped_stat ) @@ -294,7 +294,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/intrusive-set/intrusive_michael_michael_nogc.cpp b/test/unit/intrusive-set/intrusive_michael_michael_nogc.cpp index 0d1d8dde..72ab511c 100644 --- a/test/unit/intrusive-set/intrusive_michael_michael_nogc.cpp +++ b/test/unit/intrusive-set/intrusive_michael_michael_nogc.cpp @@ -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: @@ -138,7 +138,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_NoGC, base_wrapped_stat ) @@ -161,7 +161,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_NoGC, member_cmp ) @@ -254,7 +254,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( IntrusiveMichaelSet_NoGC, member_wrapped_stat ) @@ -277,7 +277,7 @@ namespace { set_type s( kSize, 2 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/intrusive-set/test_intrusive_feldman_hashset.h b/test/unit/intrusive-set/test_intrusive_feldman_hashset.h index 0c18fa3b..bbcf320e 100644 --- a/test/unit/intrusive-set/test_intrusive_feldman_hashset.h +++ b/test/unit/intrusive-set/test_intrusive_feldman_hashset.h @@ -191,11 +191,11 @@ namespace cds_test { EXPECT_FALSE( updResult.second ); break; case 1: - EXPECT_EQ( i.nInsertCount, 0 ); + EXPECT_EQ( i.nInsertCount, 0u ); ASSERT_TRUE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} )); - EXPECT_EQ( i.nInsertCount, 1 ); + EXPECT_EQ( i.nInsertCount, 1u ); ASSERT_FALSE( s.insert( i, []( value_type& v ) { ++v.nInsertCount;} ) ); - EXPECT_EQ( i.nInsertCount, 1 ); + EXPECT_EQ( i.nInsertCount, 1u ); i.nInsertCount = 0; break; case 2: @@ -208,7 +208,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey ) ); EXPECT_EQ( i.nFindCount, 0 ); ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } )); - EXPECT_EQ( i.nFindCount, 1 ); + EXPECT_EQ( i.nFindCount, 1u ); } ASSERT_FALSE( s.empty() ); ASSERT_CONTAINER_SIZE( s, nSetSize ); @@ -230,7 +230,7 @@ namespace cds_test { ASSERT_TRUE( s.contains( i.nKey ) ); EXPECT_EQ( i.nFindCount, 0 ); ASSERT_TRUE( s.find( i.nKey, []( value_type& v ) { ++v.nFindCount; } ) ); - EXPECT_EQ( i.nFindCount, 1 ); + EXPECT_EQ( i.nFindCount, 1u ); value_type v( i ); switch ( i.key() % 3 ) { @@ -244,11 +244,11 @@ namespace cds_test { ASSERT_FALSE( s.erase( i.key() ) ); break; case 2: - EXPECT_EQ( i.nEraseCount, 0 ); + EXPECT_EQ( i.nEraseCount, 0u ); ASSERT_TRUE( s.erase( v.key(), []( value_type& val ) { ++val.nEraseCount; } )); - EXPECT_EQ( i.nEraseCount, 1 ); + EXPECT_EQ( i.nEraseCount, 1u ); ASSERT_FALSE( s.erase( v.key(), []( value_type& val ) { ++val.nEraseCount; } )); - EXPECT_EQ( i.nEraseCount, 1 ); + EXPECT_EQ( i.nEraseCount, 1u ); break; } @@ -261,7 +261,7 @@ namespace cds_test { // Force retiring cycle Set::gc::force_dispose(); for ( auto& i : data ) { - EXPECT_EQ( i.nDisposeCount, 1 ); + EXPECT_EQ( i.nDisposeCount, 1u ); } // clear @@ -277,7 +277,7 @@ namespace cds_test { ++it->nFindCount; } for ( auto it = s.cbegin(); it != s.cend(); ++it ) { - EXPECT_EQ( it->nFindCount, 1 ); + EXPECT_EQ( it->nFindCount, 1u ); } // Reverse iterator test @@ -285,25 +285,25 @@ namespace cds_test { ++it->nFindCount; } for ( auto it = s.crbegin(); it != s.crend(); ++it ) { - EXPECT_EQ( it->nFindCount, 2 ); + EXPECT_EQ( it->nFindCount, 2u ); } for ( auto& i : data ) { - EXPECT_EQ( i.nFindCount, 2 ); + EXPECT_EQ( i.nFindCount, 2u ); } // 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 ); } } }; diff --git a/test/unit/intrusive-set/test_intrusive_michael_iterable.h b/test/unit/intrusive-set/test_intrusive_michael_iterable.h index e1507468..ec6dc156 100644 --- a/test/unit/intrusive-set/test_intrusive_michael_iterable.h +++ b/test/unit/intrusive-set/test_intrusive_michael_iterable.h @@ -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: @@ -265,11 +265,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: @@ -344,18 +344,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; } @@ -373,7 +373,7 @@ namespace cds_test { // Force retiring cycle Set::gc::force_dispose(); for ( auto& i : data ) { - EXPECT_EQ( i.nDisposeCount, 1 ); + EXPECT_EQ( i.nDisposeCount, 1u ); } // clear @@ -389,24 +389,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 ); } } diff --git a/test/unit/misc/bitop.cpp b/test/unit/misc/bitop.cpp index 58e7339e..487575cd 100644 --- a/test/unit/misc/bitop.cpp +++ b/test/unit/misc/bitop.cpp @@ -53,7 +53,7 @@ namespace { EXPECT_EQ( cds::bitop::MSBnz( n ), nBit - 1 ) << "n=" << n; EXPECT_EQ( cds::bitop::LSBnz( n ), nBit - 1 ) << "n=" << n; EXPECT_EQ( cds::bitop::SBC( n ), 1 ) << "n=" << n; - EXPECT_EQ( cds::bitop::ZBC( n ), sizeof( n ) * 8 - 1 ) << "n=" << n; + EXPECT_EQ( cds::bitop::ZBC( n ), static_cast( sizeof( n ) * 8 - 1 )) << "n=" << n; ++nBit; } @@ -109,15 +109,15 @@ namespace { TEST_F( bitop, ceil_pow2 ) { - EXPECT_EQ( cds::beans::ceil2( 0 ), 1 ); - EXPECT_EQ( cds::beans::ceil2( 1 ), 1 ); - EXPECT_EQ( cds::beans::ceil2( 2 ), 2 ); - EXPECT_EQ( cds::beans::ceil2( 3 ), 4 ); - EXPECT_EQ( cds::beans::ceil2( 4 ), 4 ); - EXPECT_EQ( cds::beans::ceil2( 5 ), 8 ); - EXPECT_EQ( cds::beans::ceil2( 7 ), 8 ); - EXPECT_EQ( cds::beans::ceil2( 8 ), 8 ); - EXPECT_EQ( cds::beans::ceil2( 9 ), 16 ); + EXPECT_EQ( cds::beans::ceil2( 0 ), 1u ); + EXPECT_EQ( cds::beans::ceil2( 1 ), 1u ); + EXPECT_EQ( cds::beans::ceil2( 2 ), 2u ); + EXPECT_EQ( cds::beans::ceil2( 3 ), 4u ); + EXPECT_EQ( cds::beans::ceil2( 4 ), 4u ); + EXPECT_EQ( cds::beans::ceil2( 5 ), 8u ); + EXPECT_EQ( cds::beans::ceil2( 7 ), 8u ); + EXPECT_EQ( cds::beans::ceil2( 8 ), 8u ); + EXPECT_EQ( cds::beans::ceil2( 9 ), 16u ); for ( uint32_t n = 4; n < (uint32_t(1) << 31); n <<= 1 ) { diff --git a/test/unit/misc/cxx11_atomic_class.cpp b/test/unit/misc/cxx11_atomic_class.cpp index 3cf53c04..cb9aaca7 100644 --- a/test/unit/misc/cxx11_atomic_class.cpp +++ b/test/unit/misc/cxx11_atomic_class.cpp @@ -201,7 +201,7 @@ namespace { EXPECT_EQ( (a &= (integral_type) ~mask ), ( prev & (integral_type) ~mask )); prev = a; - EXPECT_EQ( ( prev & mask), 0); + EXPECT_EQ( ( prev & mask), 0u); EXPECT_EQ( (a ^= mask ), (prev ^ mask )); prev = a; @@ -220,8 +220,8 @@ namespace { EXPECT_TRUE( a.is_lock_free() ); a.store((integral_type) 0, oStore ); - EXPECT_EQ( a, 0 ); - EXPECT_EQ( a.load( oLoad ), 0 ); + EXPECT_EQ( a, integral_type( 0 )); + EXPECT_EQ( a.load( oLoad ), integral_type( 0 )); for ( size_t nByte = 0; nByte < sizeof(Integral); ++nByte ) { integral_type n = integral_type(42) << (nByte * 8); diff --git a/test/unit/pqueue/test_fcpqueue.h b/test/unit/pqueue/test_fcpqueue.h index 404608ed..20468a04 100644 --- a/test/unit/pqueue/test_fcpqueue.h +++ b/test/unit/pqueue/test_fcpqueue.h @@ -80,13 +80,13 @@ namespace cds_test { } ASSERT_TRUE( !pq.empty() ); - ASSERT_EQ( pq.size(), 1 ); + ASSERT_EQ( pq.size(), 1u ); ASSERT_TRUE( pq.pop( kv ) ); EXPECT_EQ( kv.k, PQueueTest::c_nMinValue ); ASSERT_TRUE( pq.empty() ); - ASSERT_EQ( pq.size(), 0 ); + ASSERT_EQ( pq.size(), 0u ); // pop from empty pqueue kv.k = PQueueTest::c_nCapacity * 2; @@ -102,7 +102,7 @@ namespace cds_test { pq.clear(); ASSERT_TRUE( pq.empty() ); - ASSERT_EQ( pq.size(), 0 ); + ASSERT_EQ( pq.size(), 0u ); } }; } // namespace cds_test diff --git a/test/unit/queue/fcqueue.cpp b/test/unit/queue/fcqueue.cpp index c729edf2..4499db33 100644 --- a/test/unit/queue/fcqueue.cpp +++ b/test/unit/queue/fcqueue.cpp @@ -60,7 +60,7 @@ namespace { for ( size_t i = 0; i < nSize; ++i ) { it = -1; ASSERT_TRUE( q.dequeue( it )); - ASSERT_EQ( it, i ); + ASSERT_EQ( it, static_cast( i )); ASSERT_EQ( q.size(), nSize - i - 1 ); } ASSERT_TRUE( q.empty() ); diff --git a/test/unit/queue/test_bounded_queue.h b/test/unit/queue/test_bounded_queue.h index fb721bcd..9632c2da 100644 --- a/test/unit/queue/test_bounded_queue.h +++ b/test/unit/queue/test_bounded_queue.h @@ -61,7 +61,7 @@ namespace cds_test { for ( size_t i = 0; i < nSize; ++i ) { it = -1; ASSERT_TRUE( q.dequeue( it ) ); - ASSERT_EQ( it, i ); + ASSERT_EQ( it, static_cast( i )); ASSERT_CONTAINER_SIZE( q, nSize - i - 1 ); } ASSERT_TRUE( q.empty() ); @@ -111,7 +111,7 @@ namespace cds_test { ASSERT_CONTAINER_SIZE( q, nSize - i - 1 ); } ASSERT_TRUE( q.empty() ); - ASSERT_CONTAINER_SIZE( q, 0 ); + ASSERT_CONTAINER_SIZE( q, 0u ); for ( size_t i = 0; i < nSize; ++i ) { ASSERT_TRUE( q.push( static_cast(i) ) ); @@ -131,19 +131,19 @@ namespace cds_test { // clear q.clear(); ASSERT_TRUE( q.empty() ); - ASSERT_CONTAINER_SIZE( q, 0 ); + ASSERT_CONTAINER_SIZE( q, 0u ); // pop from empty queue it = static_cast(nSize * 2); ASSERT_FALSE( q.pop( it ) ); ASSERT_EQ( it, nSize * 2 ); ASSERT_TRUE( q.empty() ); - ASSERT_CONTAINER_SIZE( q, 0 ); + ASSERT_CONTAINER_SIZE( q, 0u ); ASSERT_FALSE( q.dequeue( it ) ); ASSERT_EQ( it, nSize * 2 ); ASSERT_TRUE( q.empty() ); - ASSERT_CONTAINER_SIZE( q, 0 ); + ASSERT_CONTAINER_SIZE( q, 0u ); } template diff --git a/test/unit/queue/test_generic_queue.h b/test/unit/queue/test_generic_queue.h index 9cc7c9f9..65203474 100644 --- a/test/unit/queue/test_generic_queue.h +++ b/test/unit/queue/test_generic_queue.h @@ -79,7 +79,7 @@ namespace cds_test { for ( size_t i = 0; i < nSize; ++i ) { it = -1; ASSERT_TRUE( q.pop( it ) ); - ASSERT_EQ( it, i ); + ASSERT_EQ( it, static_cast( i )); ASSERT_CONTAINER_SIZE( q, nSize - i - 1 ); } ASSERT_TRUE( q.empty() ); diff --git a/test/unit/set/michael_iterable_dhp.cpp b/test/unit/set/michael_iterable_dhp.cpp index 9c09643b..8b8cc035 100644 --- a/test/unit/set/michael_iterable_dhp.cpp +++ b/test/unit/set/michael_iterable_dhp.cpp @@ -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 { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelIterableSet_DHP, wrapped_stat ) @@ -214,7 +214,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_iterable_hp.cpp b/test/unit/set/michael_iterable_hp.cpp index 444dc68d..70fa1867 100644 --- a/test/unit/set/michael_iterable_hp.cpp +++ b/test/unit/set/michael_iterable_hp.cpp @@ -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 { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelIterableSet_HP, wrapped_stat ) @@ -215,7 +215,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_lazy_dhp.cpp b/test/unit/set/michael_lazy_dhp.cpp index b362edca..6c742b18 100644 --- a/test/unit/set/michael_lazy_dhp.cpp +++ b/test/unit/set/michael_lazy_dhp.cpp @@ -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: @@ -213,7 +213,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelLazySet_DHP, wrapped_stat ) @@ -235,7 +235,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_lazy_hp.cpp b/test/unit/set/michael_lazy_hp.cpp index 88ddd892..86cf2e9b 100644 --- a/test/unit/set/michael_lazy_hp.cpp +++ b/test/unit/set/michael_lazy_hp.cpp @@ -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 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelLazySet_HP, wrapped_stat ) @@ -236,7 +236,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_lazy_nogc.cpp b/test/unit/set/michael_lazy_nogc.cpp index 8a14438d..dfe7ad15 100644 --- a/test/unit/set/michael_lazy_nogc.cpp +++ b/test/unit/set/michael_lazy_nogc.cpp @@ -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: @@ -204,7 +204,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelLazySet_NoGC, wrapped_stat ) @@ -226,7 +226,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_michael_dhp.cpp b/test/unit/set/michael_michael_dhp.cpp index 97a1be2b..e4fdc77b 100644 --- a/test/unit/set/michael_michael_dhp.cpp +++ b/test/unit/set/michael_michael_dhp.cpp @@ -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 { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelSet_DHP, wrapped_stat ) @@ -214,7 +214,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_michael_hp.cpp b/test/unit/set/michael_michael_hp.cpp index 081b3450..779008bb 100644 --- a/test/unit/set/michael_michael_hp.cpp +++ b/test/unit/set/michael_michael_hp.cpp @@ -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 { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelSet_HP, wrapped_stat ) @@ -215,7 +215,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/michael_michael_nogc.cpp b/test/unit/set/michael_michael_nogc.cpp index e8066231..3c97a4e2 100644 --- a/test/unit/set/michael_michael_nogc.cpp +++ b/test/unit/set/michael_michael_nogc.cpp @@ -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: @@ -183,7 +183,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } TEST_F( MichaelSet_NoGC, wrapped_stat ) @@ -205,7 +205,7 @@ namespace { set_type s( kSize, 4 ); test( s ); - EXPECT_GE( s.statistics().m_nInsertSuccess, 0 ); + EXPECT_GE( s.statistics().m_nInsertSuccess, 0u ); } } // namespace diff --git a/test/unit/set/test_feldman_hashset.h b/test/unit/set/test_feldman_hashset.h index b1c76b07..1ee5bbf1 100644 --- a/test/unit/set/test_feldman_hashset.h +++ b/test/unit/set/test_feldman_hashset.h @@ -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: diff --git a/test/unit/set/test_feldman_hashset_hp.h b/test/unit/set/test_feldman_hashset_hp.h index ecc13827..d825dc1e 100644 --- a/test/unit/set/test_feldman_hashset_hp.h +++ b/test/unit/set/test_feldman_hashset_hp.h @@ -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: @@ -77,7 +77,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( it->key() * 3 )); } // reverse iterator set @@ -86,7 +86,7 @@ namespace cds_test { } for ( auto it = s.crbegin(); it != s.crend(); ++it ) { - EXPECT_EQ( it->nFindCount, it->key() * 2 ); + EXPECT_EQ( it->nFindCount, static_cast( it->key() * 2 )); } typedef typename Set::guarded_ptr guarded_ptr; @@ -101,7 +101,7 @@ namespace cds_test { gp = s.get( i.key()); ASSERT_FALSE( !gp ); EXPECT_EQ( gp->key(), i.key() ); - EXPECT_EQ( gp->nFindCount, i.key() * 2 ); + EXPECT_EQ( gp->nFindCount, static_cast( i.key() * 2 )); gp->nFindCount *= 2; gp.release(); @@ -115,7 +115,7 @@ namespace cds_test { gp = s.extract( i.key() ); ASSERT_FALSE( !gp ); EXPECT_EQ( gp->key(), i.key() ); - EXPECT_EQ( gp->nFindCount, i.key() * 4 ); + EXPECT_EQ( gp->nFindCount, static_cast<>size_t( i.key() * 4 )); gp = s.extract( i.key() ); ASSERT_TRUE( !gp ); diff --git a/test/unit/set/test_feldman_hashset_rcu.h b/test/unit/set/test_feldman_hashset_rcu.h index 957d9ff8..1ec36283 100644 --- a/test/unit/set/test_feldman_hashset_rcu.h +++ b/test/unit/set/test_feldman_hashset_rcu.h @@ -111,7 +111,7 @@ namespace { value_type * p = s.get( i.key()); ASSERT_TRUE( p != nullptr ); EXPECT_EQ( p->key(), i.key() ); - EXPECT_EQ( p->nFindCount, i.key() * 2 ); + EXPECT_EQ( p->nFindCount, static_cast( i.key() * 2 )); p->nFindCount *= 2; } } @@ -125,7 +125,7 @@ namespace { xp = s.extract( i.key() ); ASSERT_FALSE( !xp ); EXPECT_EQ( xp->key(), i.key() ); - EXPECT_EQ( xp->nFindCount, i.key() * 4 ); + EXPECT_EQ( xp->nFindCount, static_cast( i.key() * 4 )); xp = s.extract( i.key() ); ASSERT_TRUE( !xp ); diff --git a/test/unit/striped-set/test_intrusive_set.h b/test/unit/striped-set/test_intrusive_set.h index 82f4e386..a686d6b5 100644 --- a/test/unit/striped-set/test_intrusive_set.h +++ b/test/unit/striped-set/test_intrusive_set.h @@ -470,7 +470,7 @@ namespace cds_test { ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} )); } ASSERT_TRUE( s.empty() ); - ASSERT_CONTAINER_SIZE( s, 0 ); + ASSERT_CONTAINER_SIZE( s, 0u ); // clear for ( auto& i : data ) { @@ -483,7 +483,7 @@ namespace cds_test { s.clear(); ASSERT_TRUE( s.empty() ); - ASSERT_CONTAINER_SIZE( s, 0 ); + ASSERT_CONTAINER_SIZE( s, 0u ); // clear_and_dispose for ( auto& i : data ) { @@ -498,7 +498,7 @@ namespace cds_test { ASSERT_TRUE( s.empty() ); ASSERT_CONTAINER_SIZE( s, 0 ); for ( auto& i : data ) { - EXPECT_EQ( i.nDisposeCount, 1 ); + EXPECT_EQ( i.nDisposeCount, 1u ); } } diff --git a/test/unit/striped-set/test_set.h b/test/unit/striped-set/test_set.h index 15667e60..9cc709d6 100644 --- a/test/unit/striped-set/test_set.h +++ b/test/unit/striped-set/test_set.h @@ -354,7 +354,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: @@ -363,7 +363,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: @@ -388,7 +388,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: @@ -413,7 +413,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: @@ -465,11 +465,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_predicate(), []( value_type& v, other_item const& ) { - EXPECT_EQ( ++v.nFindCount, 3 ); + EXPECT_EQ( ++v.nFindCount, 3u ); })); int nKey = i.key() - 1; @@ -538,7 +538,7 @@ namespace cds_test { ASSERT_FALSE( s.find_with( other_item( i.key()), other_predicate(), []( value_type&, other_item const& ) {} )); } ASSERT_TRUE( s.empty() ); - ASSERT_CONTAINER_SIZE( s, 0 ); + ASSERT_CONTAINER_SIZE( s, 0u ); // clear @@ -552,7 +552,7 @@ namespace cds_test { s.clear(); ASSERT_TRUE( s.empty() ); - ASSERT_CONTAINER_SIZE( s, 0 ); + ASSERT_CONTAINER_SIZE( s, 0u ); } }; -- 2.34.1