From 40a5453909484139fc270121370575632c8e9e5c Mon Sep 17 00:00:00 2001 From: khizmax Date: Tue, 27 Sep 2016 23:57:03 +0300 Subject: [PATCH] Fixed Clang build Fixed minor lang warnings --- CMakeLists.txt | 4 ++-- cds/compiler/clang/defs.h | 20 ++++++++++--------- cds/compiler/gcc/defs.h | 4 ++-- cds/container/michael_set_nogc.h | 4 ++-- cds/container/michael_set_rcu.h | 4 ++-- cds/gc/impl/dhp_decl.h | 9 +++++++-- cds/gc/impl/hp_decl.h | 9 +++++++-- cds/intrusive/impl/iterable_list.h | 4 ++-- .../test_intrusive_skiplist_rcu.h | 6 +++--- test/unit/list/test_kv_iterable_list.h | 1 - test/unit/list/test_kv_iterable_list_hp.h | 5 +---- test/unit/list/test_kv_list.h | 1 - test/unit/list/test_kv_list_hp.h | 7 ++----- test/unit/list/test_kv_list_nogc.h | 9 ++------- test/unit/list/test_kv_list_rcu.h | 3 --- test/unit/map/test_map_hp.h | 3 +-- test/unit/map/test_map_nogc.h | 1 - test/unit/map/test_map_rcu.h | 5 ++--- test/unit/map/test_michael_iterable_hp.h | 1 - test/unit/misc/cxx11_atomic_class.cpp | 2 ++ test/unit/misc/cxx11_atomic_func.cpp | 2 ++ test/unit/set/skiplist_dhp.cpp | 8 ++------ test/unit/set/skiplist_hp.cpp | 8 ++------ test/unit/set/test_feldman_hashset_hp.h | 1 - .../unit/striped-set/intrusive_cuckoo_set.cpp | 1 - 25 files changed, 54 insertions(+), 68 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b059ad37..6aaa300d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,12 +78,12 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug CACHE STRING "Default build type to Debug" FORCE) endif() -if(CMAKE_COMPILER_IS_GNUCXX) +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -fno-strict-aliasing") if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcx16") endif() - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0") + if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0") # gcc 4.8 - 6: disable noise -Wunused-local-typedefs set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs") endif() diff --git a/cds/compiler/clang/defs.h b/cds/compiler/clang/defs.h index 473c8fb8..8d701051 100644 --- a/cds/compiler/clang/defs.h +++ b/cds/compiler/clang/defs.h @@ -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 CDSLIB_COMPILER_CLANG_DEFS_H @@ -127,14 +127,16 @@ #define cds_likely( expr ) __builtin_expect( !!( expr ), 1 ) #define cds_unlikely( expr ) __builtin_expect( !!( expr ), 0 ) -// double-width CAS support -#if CDS_BUILD_BITS == 64 -# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 -# define CDS_DCAS_SUPPORT -# endif -#else -# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -# define CDS_DCAS_SUPPORT +// double-width CAS support - only for libc++ +#ifdef _LIBCPP_VERSION +# if CDS_BUILD_BITS == 64 +# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 +# define CDS_DCAS_SUPPORT +# endif +# else +# ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 +# define CDS_DCAS_SUPPORT +# endif # endif #endif diff --git a/cds/compiler/gcc/defs.h b/cds/compiler/gcc/defs.h index 59c5e86a..5c4fb8a3 100644 --- a/cds/compiler/gcc/defs.h +++ b/cds/compiler/gcc/defs.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 CDSLIB_COMPILER_GCC_DEFS_H diff --git a/cds/container/michael_set_nogc.h b/cds/container/michael_set_nogc.h index 6e0cceac..3e3231dc 100644 --- a/cds/container/michael_set_nogc.h +++ b/cds/container/michael_set_nogc.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: @@ -94,7 +94,7 @@ namespace cds { namespace container { typedef internal_bucket_type_ base_class; public: using base_class::base_class; - using base_class::node_type; + using typename base_class::node_type; using base_class::alloc_node; using base_class::insert_node; using base_class::node_to_value; diff --git a/cds/container/michael_set_rcu.h b/cds/container/michael_set_rcu.h index c5ca7d4e..7b5249cf 100644 --- a/cds/container/michael_set_rcu.h +++ b/cds/container/michael_set_rcu.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: @@ -175,7 +175,7 @@ namespace cds { namespace container { typedef internal_bucket_type_ base_class; public: using base_class::base_class; - using base_class::node_type; + using typename base_class::node_type; using base_class::alloc_node; using base_class::insert_node; using base_class::node_to_value; diff --git a/cds/gc/impl/dhp_decl.h b/cds/gc/impl/dhp_decl.h index 128c8845..ba4e4172 100644 --- a/cds/gc/impl/dhp_decl.h +++ b/cds/gc/impl/dhp_decl.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: @@ -324,6 +324,11 @@ namespace cds { namespace gc { m_guard = nullptr; return g; } + + dhp::details::guard_data*& guard_ref() + { + return m_guard; + } //@endcond private: @@ -629,7 +634,7 @@ namespace cds { namespace gc { /// Move-assignment from \p Guard guarded_ptr& operator=( Guard&& g ) CDS_NOEXCEPT { - std::swap( m_guard, g.m_guard ); + std::swap( m_guard, g.guard_ref() ); return *this; } diff --git a/cds/gc/impl/hp_decl.h b/cds/gc/impl/hp_decl.h index 354ac6a8..0ecd0108 100644 --- a/cds/gc/impl/hp_decl.h +++ b/cds/gc/impl/hp_decl.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: @@ -326,6 +326,11 @@ namespace cds { namespace gc { m_guard = nullptr; return g; } + + hp::details::hp_guard*& guard_ref() + { + return m_guard; + } //@endcond private: @@ -617,7 +622,7 @@ namespace cds { namespace gc { /// Move-assignment from \p Guard guarded_ptr& operator=( Guard&& g ) CDS_NOEXCEPT { - std::swap( m_pGuard, g.m_guard ); + std::swap( m_pGuard, g.guard_ref() ); return *this; } diff --git a/cds/intrusive/impl/iterable_list.h b/cds/intrusive/impl/iterable_list.h index a05ae6cd..fe85cc98 100644 --- a/cds/intrusive/impl/iterable_list.h +++ b/cds/intrusive/impl/iterable_list.h @@ -239,13 +239,13 @@ namespace cds { namespace intrusive { value_ptr operator ->() const { - return m_Guard.get(); + return m_Guard.template get(); } value_ref operator *() const { assert( m_Guard.get_native() != nullptr ); - return *m_Guard.get(); + return *m_Guard.template get(); } /// Pre-increment diff --git a/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h b/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h index efd8a7a5..d676026a 100644 --- a/test/unit/intrusive-set/test_intrusive_skiplist_rcu.h +++ b/test/unit/intrusive-set/test_intrusive_skiplist_rcu.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 CDSUNIT_SET_TEST_INTRUSIVE_SKIPLIST_RCU_H #define CDSUNIT_SET_TEST_INTRUSIVE_SKIPLIST_RCU_H @@ -172,7 +172,7 @@ TYPED_TEST_P( IntrusiveSkipListSet, member_less ) typedef typename TestFixture::member_item_type member_item_type; typedef typename TestFixture::mock_disposer mock_disposer; typedef typename TestFixture::template less less_predicate; - typedef typename TestFixture::hash_int hash_int; + //typedef typename TestFixture::hash_int hash_int; struct traits : public ci::skip_list::traits { diff --git a/test/unit/list/test_kv_iterable_list.h b/test/unit/list/test_kv_iterable_list.h index 87c533fc..8512b373 100644 --- a/test/unit/list/test_kv_iterable_list.h +++ b/test/unit/list/test_kv_iterable_list.h @@ -158,7 +158,6 @@ namespace cds_test { static const size_t nSize = 20; typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; typedef typename List::value_type list_value_type; struct key_val { int key; diff --git a/test/unit/list/test_kv_iterable_list_hp.h b/test/unit/list/test_kv_iterable_list_hp.h index e7a6b57f..79c9c944 100644 --- a/test/unit/list/test_kv_iterable_list_hp.h +++ b/test/unit/list/test_kv_iterable_list_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: @@ -45,9 +45,6 @@ namespace cds_test { // Postcondition: list is empty static const size_t nSize = 20; - typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; - typedef typename List::value_type list_value_type; typedef typename List::guarded_ptr guarded_ptr; struct key_val { diff --git a/test/unit/list/test_kv_list.h b/test/unit/list/test_kv_list.h index 2611954a..8b3fa2b6 100644 --- a/test/unit/list/test_kv_list.h +++ b/test/unit/list/test_kv_list.h @@ -158,7 +158,6 @@ namespace cds_test { static const size_t nSize = 20; typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; typedef typename List::value_type list_value_type; struct key_val { int key; diff --git a/test/unit/list/test_kv_list_hp.h b/test/unit/list/test_kv_list_hp.h index c401e664..b4bab92d 100644 --- a/test/unit/list/test_kv_list_hp.h +++ b/test/unit/list/test_kv_list_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: @@ -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_LIST_TEST_KV_LIST_HP_H @@ -45,9 +45,6 @@ namespace cds_test { // Postcondition: list is empty static const size_t nSize = 20; - typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; - typedef typename List::value_type list_value_type; typedef typename List::guarded_ptr guarded_ptr; struct key_val { diff --git a/test/unit/list/test_kv_list_nogc.h b/test/unit/list/test_kv_list_nogc.h index 26352e05..cec703fb 100644 --- a/test/unit/list/test_kv_list_nogc.h +++ b/test/unit/list/test_kv_list_nogc.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 CDSUNIT_LIST_TEST_KV_LIST_NOGC_H @@ -147,8 +147,6 @@ namespace cds_test { // Postcondition: list is empty static const size_t nSize = 20; - typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; typedef typename List::value_type list_value_type; struct key_val { @@ -300,9 +298,6 @@ namespace cds_test { // Postcondition: list is empty static const size_t nSize = 20; - typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; - typedef typename List::value_type list_value_type; struct key_val { int key; diff --git a/test/unit/list/test_kv_list_rcu.h b/test/unit/list/test_kv_list_rcu.h index 9b26317c..660c37b1 100644 --- a/test/unit/list/test_kv_list_rcu.h +++ b/test/unit/list/test_kv_list_rcu.h @@ -45,9 +45,6 @@ namespace cds_test { // Postcondition: list is empty static const size_t nSize = 20; - typedef typename List::key_type list_key_type; - typedef typename List::mapped_type list_mapped_type; - typedef typename List::value_type list_value_type; struct key_val { int key; int val; diff --git a/test/unit/map/test_map_hp.h b/test/unit/map/test_map_hp.h index d3305706..b0797ac2 100644 --- a/test/unit/map/test_map_hp.h +++ b/test/unit/map/test_map_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: @@ -51,7 +51,6 @@ namespace cds_test { EXPECT_TRUE( m.empty()); EXPECT_CONTAINER_SIZE( m, 0 ); - typedef typename Map::value_type map_pair; size_t const kkSize = base_class::kSize; std::vector arrKeys; diff --git a/test/unit/map/test_map_nogc.h b/test/unit/map/test_map_nogc.h index 9f5df9b0..1f5dbf19 100644 --- a/test/unit/map/test_map_nogc.h +++ b/test/unit/map/test_map_nogc.h @@ -55,7 +55,6 @@ namespace cds_test { typedef typename Map::value_type map_pair; typedef typename Map::iterator iterator; - typedef typename Map::const_iterator const_iterator; size_t const kkSize = kSize; std::vector arrKeys; diff --git a/test/unit/map/test_map_rcu.h b/test/unit/map/test_map_rcu.h index f05bac5f..eb831ec8 100644 --- a/test/unit/map/test_map_rcu.h +++ b/test/unit/map/test_map_rcu.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 CDSUNIT_MAP_TEST_MAP_RCU_H @@ -51,7 +51,6 @@ namespace cds_test { ASSERT_TRUE( m.empty()); ASSERT_CONTAINER_SIZE( m, 0 ); - typedef typename Map::value_type map_pair; size_t const kkSize = base_class::kSize; std::vector arrKeys; diff --git a/test/unit/map/test_michael_iterable_hp.h b/test/unit/map/test_michael_iterable_hp.h index 0bf59321..eecc1156 100644 --- a/test/unit/map/test_michael_iterable_hp.h +++ b/test/unit/map/test_michael_iterable_hp.h @@ -51,7 +51,6 @@ namespace cds_test { EXPECT_TRUE( m.empty()); EXPECT_CONTAINER_SIZE( m, 0 ); - typedef typename Map::value_type map_pair; size_t const kkSize = base_class::kSize; std::vector arrKeys; diff --git a/test/unit/misc/cxx11_atomic_class.cpp b/test/unit/misc/cxx11_atomic_class.cpp index 1e2548e0..7003e704 100644 --- a/test/unit/misc/cxx11_atomic_class.cpp +++ b/test/unit/misc/cxx11_atomic_class.cpp @@ -788,6 +788,7 @@ namespace { test_atomic_integral_volatile(); } +#if CDS_COMPILER != CDS_COMPILER_CLANG || defined(_LIBCPP_VERSION) TEST_F( cxx11_atomic_class, atomic_pointer_void ) { do_test_atomic_pointer_void(); @@ -797,6 +798,7 @@ namespace { { do_test_atomic_pointer_void(); } +#endif TEST_F( cxx11_atomic_class, atomic_pointer_char ) { diff --git a/test/unit/misc/cxx11_atomic_func.cpp b/test/unit/misc/cxx11_atomic_func.cpp index e7109851..8426ff9b 100644 --- a/test/unit/misc/cxx11_atomic_func.cpp +++ b/test/unit/misc/cxx11_atomic_func.cpp @@ -706,6 +706,7 @@ namespace misc { test_atomic_integral_volatile(); } +#if CDS_COMPILER != CDS_COMPILER_CLANG || defined(_LIBCPP_VERSION) TEST_F( cxx11_atomic_func, atomic_pointer_void ) { do_test_atomic_pointer_void(); @@ -714,6 +715,7 @@ namespace misc { { do_test_atomic_pointer_void(); } +#endif TEST_F( cxx11_atomic_func, atomic_pointer_char ) { diff --git a/test/unit/set/skiplist_dhp.cpp b/test/unit/set/skiplist_dhp.cpp index c03f1050..1dfb1f10 100644 --- a/test/unit/set/skiplist_dhp.cpp +++ b/test/unit/set/skiplist_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: @@ -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_ordered_set_hp.h" @@ -43,10 +43,6 @@ namespace { void SetUp() { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - }; typedef cc::SkipListSet< gc_type, int_item > set_type; cds::gc::dhp::GarbageCollector::Construct( 16, set_type::c_nHazardPtrCount ); diff --git a/test/unit/set/skiplist_hp.cpp b/test/unit/set/skiplist_hp.cpp index 22b157aa..43ca5a17 100644 --- a/test/unit/set/skiplist_hp.cpp +++ b/test/unit/set/skiplist_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: @@ -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_ordered_set_hp.h" @@ -43,10 +43,6 @@ namespace { void SetUp() { - struct set_traits: public cc::skip_list::traits - { - typedef cmp compare; - }; typedef cc::SkipListSet< gc_type, int_item > set_type; // +1 - for guarded_ptr diff --git a/test/unit/set/test_feldman_hashset_hp.h b/test/unit/set/test_feldman_hashset_hp.h index 8de0971e..8d4ad882 100644 --- a/test/unit/set/test_feldman_hashset_hp.h +++ b/test/unit/set/test_feldman_hashset_hp.h @@ -134,7 +134,6 @@ namespace cds_test { for ( auto it = s.begin(); it != s.end(); ++it ) { int key = it->key(); ASSERT_TRUE( s.erase_at( it )); - ASSERT_TRUE( &*it != nullptr ); EXPECT_EQ( it->key(), key ); ASSERT_FALSE( s.erase_at( it ) ); } diff --git a/test/unit/striped-set/intrusive_cuckoo_set.cpp b/test/unit/striped-set/intrusive_cuckoo_set.cpp index bddda565..a2f18fbe 100644 --- a/test/unit/striped-set/intrusive_cuckoo_set.cpp +++ b/test/unit/striped-set/intrusive_cuckoo_set.cpp @@ -51,7 +51,6 @@ namespace { base_class::test_< Set::c_isSorted>( s, data ); - typedef typename Set::value_type value_type; size_t const nSetSize = base_class::kSize; // clear -- 2.34.1