From: khizmax Date: Tue, 18 Nov 2014 06:34:58 +0000 (+0300) Subject: Remove unused vars X-Git-Tag: v2.0.0~74^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e2784d24f15873dc5b971499276cc8e4147fd46;p=libcds.git Remove unused vars --- diff --git a/cds/container/details/skip_list_base.h b/cds/container/details/skip_list_base.h index 5381b3b8..58e37a03 100644 --- a/cds/container/details/skip_list_base.h +++ b/cds/container/details/skip_list_base.h @@ -207,7 +207,7 @@ namespace cds { namespace container { } struct node_disposer { - void operator()( intrusive_node_type * pNode ) const {} + void operator()( intrusive_node_type * /*pNode*/ ) const {} }; }; diff --git a/cds/container/ellen_bintree_map_rcu.h b/cds/container/ellen_bintree_map_rcu.h index bbc76592..6ad87c11 100644 --- a/cds/container/ellen_bintree_map_rcu.h +++ b/cds/container/ellen_bintree_map_rcu.h @@ -290,6 +290,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >()); } @@ -326,6 +327,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(), [&f]( leaf_node& node) { f( node.m_Value ); } ); } @@ -399,6 +401,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( Q const& val, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( base_class::extract_with_( val, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() )); } @@ -437,6 +440,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(), [&f](leaf_node& item, K const& ) { f( item.m_Value );}); } @@ -465,6 +469,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() ); } @@ -495,6 +500,7 @@ namespace cds { namespace container { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); leaf_node * pNode = base_class::get_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >()); return pNode ? &pNode->m_Value : nullptr; diff --git a/cds/container/ellen_bintree_set_rcu.h b/cds/container/ellen_bintree_set_rcu.h index 02baa883..724daf77 100644 --- a/cds/container/ellen_bintree_set_rcu.h +++ b/cds/container/ellen_bintree_set_rcu.h @@ -298,6 +298,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()); } @@ -341,6 +342,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(), [&f]( leaf_node const& node) { f( node.m_Value ); } ); } @@ -413,6 +415,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( Q const& val, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( base_class::extract_with_( val, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() )); } @@ -468,6 +471,7 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(), [&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); } ); } @@ -475,6 +479,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(), [&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } ); } @@ -507,6 +512,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()); } @@ -537,6 +543,7 @@ namespace cds { namespace container { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); leaf_node * pNode = base_class::get_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()); return pNode ? &pNode->m_Value : nullptr; diff --git a/cds/container/impl/ellen_bintree_map.h b/cds/container/impl/ellen_bintree_map.h index 3187f55b..d38de891 100644 --- a/cds/container/impl/ellen_bintree_map.h +++ b/cds/container/impl/ellen_bintree_map.h @@ -278,6 +278,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >()); } @@ -312,6 +313,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(), [&f]( leaf_node& node) { f( node.m_Value ); } ); } @@ -380,6 +382,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& result, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::extract_with_( result.guard(), key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >()); } @@ -416,6 +419,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >(), [&f](leaf_node& item, K const& ) { f( item.m_Value );}); } @@ -442,6 +446,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() ); } @@ -470,6 +475,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& result, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::get_with_( result.guard(), key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::key_accessor >() ); } diff --git a/cds/container/impl/ellen_bintree_set.h b/cds/container/impl/ellen_bintree_set.h index 432947ed..6c8290c8 100644 --- a/cds/container/impl/ellen_bintree_set.h +++ b/cds/container/impl/ellen_bintree_set.h @@ -287,6 +287,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()); } @@ -326,6 +327,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(), [&f]( leaf_node const& node) { f( node.m_Value ); } ); } @@ -394,6 +396,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& result, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::extract_with_( result.guard(), key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()); } @@ -447,6 +450,7 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(), [&f]( leaf_node& node, Q& v ) { f( node.m_Value, v ); } ); } @@ -454,6 +458,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >(), [&f]( leaf_node& node, Q const& v ) { f( node.m_Value, v ); } ); } @@ -484,6 +489,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >()); } @@ -512,6 +518,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& result, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::get_with_( result.guard(), key, cds::details::predicate_wrapper< leaf_node, Less, typename maker::value_accessor >() ); } diff --git a/cds/container/impl/lazy_kvlist.h b/cds/container/impl/lazy_kvlist.h index b2a6425b..953b5bc1 100644 --- a/cds/container/impl/lazy_kvlist.h +++ b/cds/container/impl/lazy_kvlist.h @@ -473,6 +473,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -506,6 +507,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -552,6 +554,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, K const& key, Less pred ) { + CDS_UNUSED( pred ); return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper::type() ); } @@ -576,6 +579,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -613,6 +617,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -661,6 +666,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, K const& key, Less pred ) { + CDS_UNUSED( pred ); return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper::type() ); } diff --git a/cds/container/impl/lazy_list.h b/cds/container/impl/lazy_list.h index 9e04fef7..c61f030a 100644 --- a/cds/container/impl/lazy_list.h +++ b/cds/container/impl/lazy_list.h @@ -442,6 +442,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), [](value_type const&){} ); } @@ -482,6 +483,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -528,6 +530,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper::type() ); } @@ -552,6 +555,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -599,12 +603,14 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@endcond @@ -654,6 +660,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper::type() ); } diff --git a/cds/container/impl/michael_kvlist.h b/cds/container/impl/michael_kvlist.h index 8c0a5f53..f0c766a6 100644 --- a/cds/container/impl/michael_kvlist.h +++ b/cds/container/impl/michael_kvlist.h @@ -477,6 +477,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -512,6 +513,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -561,6 +563,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, K const& key, Less pred ) { + CDS_UNUSED( pred ); return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper::type() ); } @@ -585,6 +588,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -622,6 +626,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -673,6 +678,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, K const& key, Less pred ) { + CDS_UNUSED( pred ); return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper::type() ); } diff --git a/cds/container/impl/michael_list.h b/cds/container/impl/michael_list.h index 966da076..e4ac8e13 100644 --- a/cds/container/impl/michael_list.h +++ b/cds/container/impl/michael_list.h @@ -433,6 +433,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), [](value_type const&){} ); } @@ -471,6 +472,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -517,6 +519,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return extract_at( head(), dest.guard(), key, typename maker::template less_wrapper::type() ); } @@ -541,6 +544,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -585,12 +589,14 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@endcond @@ -640,6 +646,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return get_at( head(), ptr.guard(), key, typename maker::template less_wrapper::type() ); } diff --git a/cds/container/impl/skip_list_map.h b/cds/container/impl/skip_list_map.h index 98f73d66..c565fae4 100644 --- a/cds/container/impl/skip_list_map.h +++ b/cds/container/impl/skip_list_map.h @@ -356,6 +356,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >()); } @@ -390,6 +391,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(), [&f]( node_type& node) { f( node.m_Value ); } ); @@ -440,6 +442,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& ptr, K const& key, Less pred ) { + CDS_UNUSED( pred ); typedef cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor > wrapped_less; return base_class::extract_( ptr.guard(), key, cds::opt::details::make_comparator_from_less() ); } @@ -534,6 +537,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(), [&f](node_type& item, K const& ) { f( item.m_Value );}); @@ -561,6 +565,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ); } @@ -612,6 +617,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, K const& key, Less pred ) { + CDS_UNUSED( pred ); typedef cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor > wrapped_less; return base_class::get_with_( ptr.guard(), key, cds::opt::details::make_comparator_from_less< wrapped_less >()); } diff --git a/cds/container/impl/skip_list_set.h b/cds/container/impl/skip_list_set.h index 9de1eb5e..59082192 100644 --- a/cds/container/impl/skip_list_set.h +++ b/cds/container/impl/skip_list_set.h @@ -328,6 +328,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >() ); } @@ -367,6 +368,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type const& node) { f( node.m_Value ); } ); } @@ -416,6 +418,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& ptr, Q const& key, Less pred ) { + CDS_UNUSED( pred ); typedef cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor > wrapped_less; return base_class::extract_( ptr.guard(), key, cds::opt::details::make_comparator_from_less() ); } @@ -523,6 +526,7 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } @@ -530,6 +534,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } @@ -560,6 +565,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); } @@ -611,6 +617,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& result, Q const& key, Less pred ) { + CDS_UNUSED( pred ); typedef cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor > wrapped_less; return base_class::get_with_( result.guard(), key, cds::opt::details::make_comparator_from_less< wrapped_less >()); } diff --git a/cds/container/lazy_kvlist_nogc.h b/cds/container/lazy_kvlist_nogc.h index f1d6035b..b5a9df89 100644 --- a/cds/container/lazy_kvlist_nogc.h +++ b/cds/container/lazy_kvlist_nogc.h @@ -421,6 +421,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type() ) ); } diff --git a/cds/container/lazy_kvlist_rcu.h b/cds/container/lazy_kvlist_rcu.h index caae0c70..40f234f0 100644 --- a/cds/container/lazy_kvlist_rcu.h +++ b/cds/container/lazy_kvlist_rcu.h @@ -471,6 +471,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -506,6 +507,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -565,6 +567,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper::type() )); } @@ -591,6 +594,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -630,6 +634,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -678,6 +683,7 @@ namespace cds { namespace container { template value_type * get_with( K const& key, Less pred ) const { + CDS_UNUSED( pred ); return get_at( head(), key, typename maker::template less_wrapper::type()); } diff --git a/cds/container/lazy_list_nogc.h b/cds/container/lazy_list_nogc.h index 7e46e8da..8be872b9 100644 --- a/cds/container/lazy_list_nogc.h +++ b/cds/container/lazy_list_nogc.h @@ -328,6 +328,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type() )); } diff --git a/cds/container/lazy_list_rcu.h b/cds/container/lazy_list_rcu.h index 30af7d99..757e57da 100644 --- a/cds/container/lazy_list_rcu.h +++ b/cds/container/lazy_list_rcu.h @@ -443,6 +443,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), [](value_type const&){} ); } @@ -483,6 +484,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -543,6 +545,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper::type())); } @@ -569,6 +572,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -618,12 +622,14 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@endcond @@ -673,6 +679,7 @@ namespace cds { namespace container { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return get_at( head(), key, typename maker::template less_wrapper::type()); } diff --git a/cds/container/michael_kvlist_nogc.h b/cds/container/michael_kvlist_nogc.h index 755d7c53..15a14dfa 100644 --- a/cds/container/michael_kvlist_nogc.h +++ b/cds/container/michael_kvlist_nogc.h @@ -440,6 +440,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type() ) ); } diff --git a/cds/container/michael_kvlist_rcu.h b/cds/container/michael_kvlist_rcu.h index 5be3c92c..7545e48c 100644 --- a/cds/container/michael_kvlist_rcu.h +++ b/cds/container/michael_kvlist_rcu.h @@ -466,6 +466,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -503,6 +504,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -562,6 +564,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper::type() )); } @@ -589,6 +592,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -628,6 +632,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -676,6 +681,7 @@ namespace cds { namespace container { template value_type * get_with( K const& key, Less pred ) const { + CDS_UNUSED( pred ); return get_at( head(), key, typename maker::template less_wrapper::type() ); } diff --git a/cds/container/michael_list_nogc.h b/cds/container/michael_list_nogc.h index 3c57529f..dc7092c9 100644 --- a/cds/container/michael_list_nogc.h +++ b/cds/container/michael_list_nogc.h @@ -340,6 +340,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper::type() ) ); } diff --git a/cds/container/michael_list_rcu.h b/cds/container/michael_list_rcu.h index 75f578ff..2588d688 100644 --- a/cds/container/michael_list_rcu.h +++ b/cds/container/michael_list_rcu.h @@ -441,6 +441,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), [](value_type const&){} ); } @@ -481,6 +482,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( head(), key, typename maker::template less_wrapper::type(), f ); } @@ -541,6 +543,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( extract_at( head(), key, typename maker::template less_wrapper::type() )); } @@ -567,6 +570,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type() ); } @@ -613,12 +617,14 @@ namespace cds { namespace container { template bool find_with( Q& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } //@endcond @@ -668,6 +674,7 @@ namespace cds { namespace container { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return get_at( head(), key, typename maker::template less_wrapper::type()); } diff --git a/cds/container/skip_list_map_rcu.h b/cds/container/skip_list_map_rcu.h index 129e85f1..74192804 100644 --- a/cds/container/skip_list_map_rcu.h +++ b/cds/container/skip_list_map_rcu.h @@ -365,6 +365,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >()); } @@ -401,6 +402,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(), [&f]( node_type& node) { f( node.m_Value ); } ); } @@ -436,6 +438,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( base_class::do_extract_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >())); } @@ -507,6 +510,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >(), [&f](node_type& item, K const& ) { f( item.m_Value );}); } @@ -535,6 +539,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() ); } @@ -586,6 +591,7 @@ namespace cds { namespace container { template value_type * get_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return to_value_ptr( base_class::get_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::key_accessor >() )); } diff --git a/cds/container/skip_list_set_nogc.h b/cds/container/skip_list_set_nogc.h index d930dbb5..daf323c8 100644 --- a/cds/container/skip_list_set_nogc.h +++ b/cds/container/skip_list_set_nogc.h @@ -310,6 +310,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); node_type * pNode = base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, key_accessor>() ); if ( pNode ) return node_to_iterator( pNode ); diff --git a/cds/container/skip_list_set_rcu.h b/cds/container/skip_list_set_rcu.h index 3ddf45c2..a61ce17a 100644 --- a/cds/container/skip_list_set_rcu.h +++ b/cds/container/skip_list_set_rcu.h @@ -391,6 +391,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); } @@ -434,6 +435,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type const& node) { f( node.m_Value ); } ); } @@ -469,6 +471,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( base_class::do_extract_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >())); } @@ -557,6 +560,7 @@ namespace cds { namespace container { template bool find_with( Q& val, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } @@ -564,6 +568,7 @@ namespace cds { namespace container { template bool find_with( Q const& val, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } @@ -596,6 +601,7 @@ namespace cds { namespace container { template bool find_with( Q const& val, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >()); } @@ -647,6 +653,7 @@ namespace cds { namespace container { template value_type * get_with( Q const& val, Less pred ) { + CDS_UNUSED( pred ); return to_value_ptr( base_class::get_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >() )); } diff --git a/cds/container/split_list_map.h b/cds/container/split_list_map.h index c3c8b055..d9af00eb 100644 --- a/cds/container/split_list_map.h +++ b/cds/container/split_list_map.h @@ -370,6 +370,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper() ); } @@ -404,6 +405,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper(), f ); } @@ -451,6 +453,7 @@ namespace cds { namespace container { template bool extract_with( guarded_ptr& dest, K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::extract_with_( dest.guard(), key, cds::details::predicate_wrapper() ); } @@ -489,6 +492,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper(), [&f](value_type& pair, K const&){ f( pair ); } ); @@ -516,6 +520,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find( key, cds::details::predicate_wrapper() ); } @@ -564,6 +569,7 @@ namespace cds { namespace container { template bool get_with( guarded_ptr& ptr, K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::get_with_( ptr.guard(), key, cds::details::predicate_wrapper() ); } diff --git a/cds/container/split_list_map_nogc.h b/cds/container/split_list_map_nogc.h index 8f86af6d..ba7efc5c 100644 --- a/cds/container/split_list_map_nogc.h +++ b/cds/container/split_list_map_nogc.h @@ -262,6 +262,7 @@ namespace cds { namespace container { template iterator find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper() ); } diff --git a/cds/container/split_list_map_rcu.h b/cds/container/split_list_map_rcu.h index 7b6bfae0..3354a1f9 100644 --- a/cds/container/split_list_map_rcu.h +++ b/cds/container/split_list_map_rcu.h @@ -411,6 +411,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper() ); } @@ -447,6 +448,7 @@ namespace cds { namespace container { template bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper(), f ); } @@ -504,6 +506,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::extract_with( key, cds::details::predicate_wrapper()); } @@ -544,6 +547,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper(), [&f](value_type& pair, K const&){ f( pair ); } ); @@ -573,6 +577,7 @@ namespace cds { namespace container { template bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper() ); } @@ -622,6 +627,7 @@ namespace cds { namespace container { template value_type * get_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::get_with( key, cds::details::predicate_wrapper()); } diff --git a/cds/container/split_list_set.h b/cds/container/split_list_set.h index b4a6a39e..0f79c3a5 100644 --- a/cds/container/split_list_set.h +++ b/cds/container/split_list_set.h @@ -190,6 +190,7 @@ namespace cds { namespace container { template bool find_with_( Q& val, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( val, typename maker::template predicate_wrapper::type(), [&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } ); } @@ -500,6 +501,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, typename maker::template predicate_wrapper::type() ); } @@ -539,6 +541,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, typename maker::template predicate_wrapper::type(), [&f](node_type& node) { f( node.m_Value ); } ); } @@ -673,6 +676,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, typename maker::template predicate_wrapper::type() ); } @@ -760,12 +764,14 @@ namespace cds { namespace container { template bool extract_with_( typename gc::Guard& guard, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::extract_with_( guard, key, typename maker::template predicate_wrapper::type() ); } template bool get_with_( typename gc::Guard& guard, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::get_with_( guard, key, typename maker::template predicate_wrapper::type() ); } diff --git a/cds/container/split_list_set_nogc.h b/cds/container/split_list_set_nogc.h index 30d8fe36..12d91249 100644 --- a/cds/container/split_list_set_nogc.h +++ b/cds/container/split_list_set_nogc.h @@ -327,6 +327,7 @@ namespace cds { namespace container { template iterator find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return iterator( base_class::find_with_( key, typename maker::template predicate_wrapper::type() )); } diff --git a/cds/container/split_list_set_rcu.h b/cds/container/split_list_set_rcu.h index c3abc160..41998673 100644 --- a/cds/container/split_list_set_rcu.h +++ b/cds/container/split_list_set_rcu.h @@ -213,6 +213,7 @@ namespace cds { namespace container { template bool find_with_( Q& val, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( val, typename maker::template predicate_wrapper::type(), [&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } ); } @@ -536,6 +537,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, typename maker::template predicate_wrapper::type() ); } @@ -576,6 +578,7 @@ namespace cds { namespace container { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, typename maker::template predicate_wrapper::type(), [&f](node_type& node) { f( node.m_Value ); } ); } @@ -634,6 +637,7 @@ namespace cds { namespace container { template exempt_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( base_class::extract_with_( key, typename maker::template predicate_wrapper::type())); } @@ -721,6 +725,7 @@ namespace cds { namespace container { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, typename maker::template predicate_wrapper::type() ); } @@ -771,6 +776,7 @@ namespace cds { namespace container { template value_type * get_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); node_type * pNode = base_class::get_with( key, typename maker::template predicate_wrapper::type()); return pNode ? &pNode->m_Value : nullptr; } diff --git a/cds/container/striped_map.h b/cds/container/striped_map.h index cc05e3e0..ce9a2325 100644 --- a/cds/container/striped_map.h +++ b/cds/container/striped_map.h @@ -750,6 +750,7 @@ template ,typename Bucket = bucket_type, typename = typename std::enable_if< Bucket::has_erase_with >::type > bool erase_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::erase_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >(), f ); } @@ -790,6 +791,7 @@ template ,typename Bucket = bucket_type, typename = typename std::enable_if< Bucket::has_find_with >::type > bool find_with( K const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >(), [&f]( value_type& pair, K const& ) mutable { f(pair); } ); } @@ -821,6 +823,7 @@ template ,typename Bucket = bucket_type, typename = typename std::enable_if< Bucket::has_find_with >::type > bool find_with( K const& key, Less pred ) { + CDS_UNUSED( pred ); return base_class::find_with( key, cds::details::predicate_wrapper< value_type, Less, key_accessor >() ); } diff --git a/cds/gc/details/hp_alloc.h b/cds/gc/details/hp_alloc.h index 1b53c1da..0d748cbc 100644 --- a/cds/gc/details/hp_alloc.h +++ b/cds/gc/details/hp_alloc.h @@ -244,7 +244,6 @@ namespace cds { assert( m_nTop < capacity() ); hp.clear(); ++m_nTop; - CDS_COMPILER_RW_BARRIER ; // ??? } /// Allocates hazard pointers array @@ -267,9 +266,11 @@ namespace cds { template void free( hp_array const& arr ) CDS_NOEXCEPT { + CDS_UNUSED( arr ); + assert( m_nTop + Count <= capacity()); for ( size_t i = m_nTop; i < m_nTop + Count; ++i ) - m_arrHazardPtr[ i ].clear(); + m_arrHazardPtr[i].clear(); m_nTop += Count; } @@ -290,7 +291,7 @@ namespace cds { void make_free() CDS_NOEXCEPT { for ( size_t i = 0; i < capacity(); ++i ) - m_arrHazardPtr[ i ].clear(); + m_arrHazardPtr[i].clear(); m_nTop = capacity(); } diff --git a/cds/intrusive/details/skip_list_base.h b/cds/intrusive/details/skip_list_base.h index 6d60c3d4..4f2843cf 100644 --- a/cds/intrusive/details/skip_list_base.h +++ b/cds/intrusive/details/skip_list_base.h @@ -426,8 +426,8 @@ namespace cds { namespace intrusive { /// \p SkipListSet empty internal statistics struct empty_stat { //@cond - void onAddNode( unsigned int nHeight ) const {} - void onRemoveNode( unsigned int nHeight ) const {} + void onAddNode( unsigned int /*nHeight*/ ) const {} + void onRemoveNode( unsigned int /*nHeight*/ ) const {} void onInsertSuccess() const {} void onInsertFailed() const {} void onInsertRetry() const {} diff --git a/cds/intrusive/impl/skip_list.h b/cds/intrusive/impl/skip_list.h index 9fea1249..0255a744 100644 --- a/cds/intrusive/impl/skip_list.h +++ b/cds/intrusive/impl/skip_list.h @@ -1230,6 +1230,7 @@ namespace cds { namespace intrusive { template bool extract_with( guarded_ptr& dest, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return extract_( dest.guard(), key, cds::opt::details::make_comparator_from_less() ); } @@ -1329,6 +1330,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_( key, cds::opt::details::make_comparator_from_less(), [](value_type const&) {} ); } @@ -1368,6 +1370,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_( key, cds::opt::details::make_comparator_from_less(), f ); } @@ -1417,12 +1420,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_with_( key, cds::opt::details::make_comparator_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_with_( key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -1452,6 +1457,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_with_( key, cds::opt::details::make_comparator_from_less(), [](value_type& , Q const& ) {} ); } @@ -1503,6 +1509,7 @@ namespace cds { namespace intrusive { template bool get_with( guarded_ptr& ptr, Q const& key, Less pred ) { + CDS_UNUSED( pred ); return get_with_( ptr.guard(), key, cds::opt::details::make_comparator_from_less() ); } diff --git a/cds/intrusive/mspriority_queue.h b/cds/intrusive/mspriority_queue.h index cb110007..2788fa3a 100644 --- a/cds/intrusive/mspriority_queue.h +++ b/cds/intrusive/mspriority_queue.h @@ -326,7 +326,7 @@ namespace cds { namespace intrusive { */ void clear() { - clear_with( []( value_type const& src ) {} ); + clear_with( []( value_type const& /*src*/ ) {} ); } /// Clears the queue (not atomic) diff --git a/cds/intrusive/msqueue.h b/cds/intrusive/msqueue.h index ceb85dee..c0c363ef 100644 --- a/cds/intrusive/msqueue.h +++ b/cds/intrusive/msqueue.h @@ -126,7 +126,7 @@ namespace cds { namespace intrusive { void onBadTail() {} void reset() {} - empty_stat& operator +=( empty_stat const& s ) + empty_stat& operator +=( empty_stat const& ) { return *this; } diff --git a/cds/intrusive/options.h b/cds/intrusive/options.h index 3d7ec403..18ee6cfe 100644 --- a/cds/intrusive/options.h +++ b/cds/intrusive/options.h @@ -105,7 +105,7 @@ namespace cds { namespace intrusive { //@cond typedef Node node_type; - static void is_empty( const node_type * pNode ) + static void is_empty( const node_type * /*pNode*/ ) {} //@endcond }; diff --git a/cds/intrusive/skip_list_nogc.h b/cds/intrusive/skip_list_nogc.h index bf1fe640..6f6abf4c 100644 --- a/cds/intrusive/skip_list_nogc.h +++ b/cds/intrusive/skip_list_nogc.h @@ -795,12 +795,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_with_( key, cds::opt::details::make_comparator_from_less(), f ) != nullptr; } //@cond template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_with_( key, cds::opt::details::make_comparator_from_less(), f ) != nullptr; } //@endcond @@ -832,6 +834,7 @@ namespace cds { namespace intrusive { template value_type * find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); node_type * pNode = find_with_( key, cds::opt::details::make_comparator_from_less(), [](value_type& , Q const& ) {} ); if ( pNode ) return node_traits::to_value_ptr( pNode ); diff --git a/cds/intrusive/skip_list_rcu.h b/cds/intrusive/skip_list_rcu.h index 32c15068..c63e085e 100644 --- a/cds/intrusive/skip_list_rcu.h +++ b/cds/intrusive/skip_list_rcu.h @@ -1150,6 +1150,7 @@ retry: template value_type * do_extract_with( Q const& key, Less pred ) { + CDS_UNUSED(pred); check_deadlock_policy::check(); value_type * pDel = nullptr; @@ -1753,6 +1754,7 @@ retry: template bool erase_with( const Q& key, Less pred ) { + CDS_UNUSED( pred ); return do_erase( key, cds::opt::details::make_comparator_from_less(), [](value_type const&) {} ); } @@ -1791,6 +1793,7 @@ retry: template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return do_erase( key, cds::opt::details::make_comparator_from_less(), f ); } @@ -1840,12 +1843,14 @@ retry: template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return do_find_with( key, cds::opt::details::make_comparator_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return do_find_with( key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -1873,6 +1878,7 @@ retry: template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return do_find_with( key, cds::opt::details::make_comparator_from_less(), [](value_type& , Q const& ) {} ); } @@ -1928,6 +1934,7 @@ retry: template value_type * get_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); assert( gc::is_locked()); value_type * pFound; diff --git a/cds/intrusive/split_list.h b/cds/intrusive/split_list.h index 0b76a39a..119e10dd 100644 --- a/cds/intrusive/split_list.h +++ b/cds/intrusive/split_list.h @@ -766,6 +766,7 @@ namespace cds { namespace intrusive { template bool erase_with( const Q& key, Less pred ) { + CDS_UNUSED( pred ); return erase_( key, typename wrapped_ordered_list::template make_compare_from_less() ); } @@ -803,6 +804,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } @@ -898,12 +900,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } //@endcond @@ -933,6 +937,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less() ); } diff --git a/cds/intrusive/split_list_nogc.h b/cds/intrusive/split_list_nogc.h index 8d2e8f4e..a95b6c53 100644 --- a/cds/intrusive/split_list_nogc.h +++ b/cds/intrusive/split_list_nogc.h @@ -409,12 +409,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } //@endcond @@ -569,6 +571,7 @@ namespace cds { namespace intrusive { template iterator find_with_( Q& val, Less pred ) { + CDS_UNUSED( pred ); size_t nHash = hash_value( val ); split_list::details::search_value_type sv( val, split_list::regular_hash( nHash )); dummy_node_type * pHead = get_bucket( nHash ); diff --git a/cds/intrusive/split_list_rcu.h b/cds/intrusive/split_list_rcu.h index 7aaa0955..b3f75cfb 100644 --- a/cds/intrusive/split_list_rcu.h +++ b/cds/intrusive/split_list_rcu.h @@ -412,6 +412,7 @@ namespace cds { namespace intrusive { template value_type * extract_with_( Q const& val, Less pred ) { + CDS_UNUSED( pred ); return extract_( val, typename wrapped_ordered_list::template make_compare_from_less()); } @@ -647,6 +648,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_( key, typename wrapped_ordered_list::template make_compare_from_less() ); } @@ -686,6 +688,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } @@ -797,12 +800,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } //@endcond @@ -828,6 +833,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_value( key, typename wrapped_ordered_list::template make_compare_from_less() ); } @@ -875,6 +881,7 @@ namespace cds { namespace intrusive { template value_type * get_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return get_( key, typename wrapped_ordered_list::template make_compare_from_less()); } diff --git a/cds/intrusive/striped_set/boost_slist.h b/cds/intrusive/striped_set/boost_slist.h index 25f2b6a2..8d98a0ce 100644 --- a/cds/intrusive/striped_set/boost_slist.h +++ b/cds/intrusive/striped_set/boost_slist.h @@ -148,7 +148,7 @@ namespace cds { namespace intrusive { namespace striped_set { } template - value_type * erase( Q const& key, Less pred, Func f ) + value_type * erase( Q const& key, Less /*pred*/, Func f ) { return erase_( key, cds::opt::details::make_comparator_from_less(), f ); } diff --git a/cds/lock/array.h b/cds/lock/array.h index 64b92937..7901ebbb 100644 --- a/cds/lock/array.h +++ b/cds/lock/array.h @@ -16,12 +16,14 @@ namespace cds { namespace lock { size_t operator()( size_t nWhat, size_t nCapacity ) const { assert( nWhat < nCapacity ); + CDS_UNUSED( nCapacity ); return nWhat; } /// Checks if \p nCapacity is acceptable by policy. For trivial policy, any \p nCapacity is accepted. static bool is_capacity_accepted( size_t nCapacity ) { + CDS_UNUSED( nCapacity ); return true; } }; diff --git a/cds/memory/michael/allocator.h b/cds/memory/michael/allocator.h index 5680f17f..4ddfb1b3 100644 --- a/cds/memory/michael/allocator.h +++ b/cds/memory/michael/allocator.h @@ -1420,6 +1420,7 @@ namespace michael { /// Allocates new processor descriptor processor_desc * new_processor_desc( unsigned int nProcessorId ) { + CDS_UNUSED( nProcessorId ); processor_desc * pDesc; const size_t nPageHeapCount = m_SizeClassSelector.pageTypeCount(); diff --git a/cds/opt/buffer.h b/cds/opt/buffer.h index 75821579..d80efc91 100644 --- a/cds/opt/buffer.h +++ b/cds/opt/buffer.h @@ -78,6 +78,7 @@ namespace cds { namespace opt { */ static_buffer( size_t nCapacity ) { + CDS_UNUSED( nCapacity ); // Capacity must be power of 2 static_assert( !c_bExp2 || (c_nCapacity & (c_nCapacity - 1)) == 0, "Capacity must be power of two"); //assert( c_nCapacity == nCapacity ); diff --git a/cds/urcu/details/sh.h b/cds/urcu/details/sh.h index e4d0aed2..48ba9777 100644 --- a/cds/urcu/details/sh.h +++ b/cds/urcu/details/sh.h @@ -95,7 +95,7 @@ namespace cds { namespace urcu { namespace details { {} template - void sh_singleton::signal_handler( int signo, siginfo_t * sigInfo, void * context ) + void sh_singleton::signal_handler( int /*signo*/, siginfo_t * /*sigInfo*/, void * /*context*/ ) { thread_record * pRec = cds::threading::getRCU(); if ( pRec ) { diff --git a/projects/Win/vc12/hdr-test-map.vcxproj b/projects/Win/vc12/hdr-test-map.vcxproj index cd30650a..534b3825 100644 --- a/projects/Win/vc12/hdr-test-map.vcxproj +++ b/projects/Win/vc12/hdr-test-map.vcxproj @@ -565,7 +565,6 @@ - @@ -598,7 +597,6 @@ - diff --git a/projects/Win/vc12/hdr-test-map.vcxproj.filters b/projects/Win/vc12/hdr-test-map.vcxproj.filters index dc1016c6..066cf2a4 100644 --- a/projects/Win/vc12/hdr-test-map.vcxproj.filters +++ b/projects/Win/vc12/hdr-test-map.vcxproj.filters @@ -31,9 +31,6 @@ striped - - striped - striped @@ -73,9 +70,6 @@ striped - - striped - striped diff --git a/tests/cppunit/cppunit_mini.h b/tests/cppunit/cppunit_mini.h index 0a2666e0..81e85017 100644 --- a/tests/cppunit/cppunit_mini.h +++ b/tests/cppunit/cppunit_mini.h @@ -144,7 +144,7 @@ namespace CppUnitMini return m_pCurTestCase; } - virtual void setUpParams( const TestCfg& cfg ) {} + virtual void setUpParams( const TestCfg& /*cfg*/ ) {} virtual void endTestCase() {} virtual void myRun(const char * /*in_name*/, bool /*invert*/ = false) {} diff --git a/tests/cppunit/thread.cpp b/tests/cppunit/thread.cpp index 39088d9e..af15fa93 100644 --- a/tests/cppunit/thread.cpp +++ b/tests/cppunit/thread.cpp @@ -117,7 +117,7 @@ namespace CppUnitMini { pThread->m_nDuration = pThread->m_Timer.duration(); } - void ThreadPool::onThreadFiniDone( TestThread * pThread ) + void ThreadPool::onThreadFiniDone( TestThread * /*pThread*/ ) { // Calls in context of caller thread // Wait while all threads done diff --git a/tests/test-hdr/map/hdr_refinable_hashmap_boost_unordered_map.cpp b/tests/test-hdr/map/hdr_refinable_hashmap_boost_unordered_map.cpp index a275f35d..1e18fb96 100644 --- a/tests/test-hdr/map/hdr_refinable_hashmap_boost_unordered_map.cpp +++ b/tests/test-hdr/map/hdr_refinable_hashmap_boost_unordered_map.cpp @@ -13,7 +13,7 @@ namespace map { struct my_copy_policy { typedef map_t::iterator iterator; - void operator()( map_t& m, iterator itInsert, iterator itWhat ) + void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat ) { m.insert( std::make_pair(itWhat->first, itWhat->second ) ); } diff --git a/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_std.cpp b/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_std.cpp index bba2d1f1..d3e06c03 100644 --- a/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_std.cpp +++ b/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_std.cpp @@ -15,7 +15,7 @@ namespace map { struct my_copy_policy { typedef map_t::iterator iterator; - void operator()( map_t& m, iterator itInsert, iterator itWhat ) + void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat ) { m.insert( std::make_pair(itWhat->first, itWhat->second ) ); } diff --git a/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_vc.cpp b/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_vc.cpp deleted file mode 100644 index 988532ca..00000000 --- a/tests/test-hdr/map/hdr_refinable_hashmap_hashmap_vc.cpp +++ /dev/null @@ -1,147 +0,0 @@ -//$$CDS-header$$ - -#include "map/hdr_striped_map.h" -#include -#include -#include - -#if (CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)) && _MSC_VER < 1600 - -namespace map { - - namespace { - typedef stdext::hash_map< StripedMapHdrTest::key_type, StripedMapHdrTest::value_type > map_t; - - struct my_copy_policy { - typedef map_t::iterator iterator; - - void operator()( map_t& m, iterator itInsert, iterator itWhat ) - { - m.insert( std::make_pair(itWhat->first, itWhat->second ) ); - } - }; - } - - void StripedMapHdrTest::Refinable_hashmap() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - > map_cmp; - test_striped< map_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - > map_less; - test_striped< map_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > map_cmpmix; - test_striped< map_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable > - , co::hash< hash_int > - , co::less< less > - > map_spin; - test_striped< map_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > map_less_resizing_lf; - map_less_resizing_lf m(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(m); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > map_less_resizing_lf16; - test_striped< map_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > map_less_resizing_sbt; - map_less_resizing_sbt m(30, cc::striped_set::single_bucket_size_threshold<0>(1024)); - test_striped_with(m); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > map_less_resizing_sbt16; - test_striped< map_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_policy"); - typedef cc::StripedMap< map_t - ,co::mutex_policy< cc::striped_set::refinable<> > - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } -} // namespace map - -#endif // #if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION < 1600 diff --git a/tests/test-hdr/map/hdr_striped_hashmap_boost_unordered_map.cpp b/tests/test-hdr/map/hdr_striped_hashmap_boost_unordered_map.cpp index 92bfba96..412fca14 100644 --- a/tests/test-hdr/map/hdr_striped_hashmap_boost_unordered_map.cpp +++ b/tests/test-hdr/map/hdr_striped_hashmap_boost_unordered_map.cpp @@ -13,7 +13,7 @@ namespace map { struct my_copy_policy { typedef map_t::iterator iterator; - void operator()( map_t& m, iterator itInsert, iterator itWhat ) + void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat ) { m.insert( std::make_pair(itWhat->first, itWhat->second ) ); } diff --git a/tests/test-hdr/map/hdr_striped_hashmap_hashmap_std.cpp b/tests/test-hdr/map/hdr_striped_hashmap_hashmap_std.cpp index 95f3c103..95ca7221 100644 --- a/tests/test-hdr/map/hdr_striped_hashmap_hashmap_std.cpp +++ b/tests/test-hdr/map/hdr_striped_hashmap_hashmap_std.cpp @@ -15,7 +15,7 @@ namespace map { struct my_copy_policy { typedef map_t::iterator iterator; - void operator()( map_t& m, iterator itInsert, iterator itWhat ) + void operator()( map_t& m, iterator /*itInsert*/, iterator itWhat ) { m.insert( std::make_pair(itWhat->first, itWhat->second ) ); } diff --git a/tests/test-hdr/map/hdr_striped_hashmap_hashmap_vc.cpp b/tests/test-hdr/map/hdr_striped_hashmap_hashmap_vc.cpp deleted file mode 100644 index cfc5de72..00000000 --- a/tests/test-hdr/map/hdr_striped_hashmap_hashmap_vc.cpp +++ /dev/null @@ -1,138 +0,0 @@ -//$$CDS-header$$ - -#include "map/hdr_striped_map.h" -#include -#include -#include - -#if (CDS_COMPILER == CDS_COMPILER_MSVC || (CDS_COMPILER == CDS_COMPILER_INTEL && CDS_OS_INTERFACE == CDS_OSI_WINDOWS)) && _MSC_VER < 1600 - -namespace map { - - namespace { - typedef stdext::hash_map< StripedMapHdrTest::key_type, StripedMapHdrTest::value_type > map_t; - - struct my_copy_policy { - typedef map_t::iterator iterator; - - void operator()( map_t& m, iterator itInsert, iterator itWhat ) - { - m.insert( std::make_pair(itWhat->first, itWhat->second ) ); - } - }; - } - - void StripedMapHdrTest::Striped_hashmap() - { - CPPUNIT_MESSAGE( "cmp"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::compare< cmp > - ,co::mutex_policy< cc::striped_set::striping<> > - > map_cmp; - test_striped< map_cmp >(); - - CPPUNIT_MESSAGE( "less"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - > map_less; - test_striped< map_less >(); - - CPPUNIT_MESSAGE( "cmpmix"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::compare< cmp > - , co::less< less > - > map_cmpmix; - test_striped< map_cmpmix >(); - - // Spinlock as lock policy - CPPUNIT_MESSAGE( "spinlock"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - ,co::mutex_policy< cc::striped_set::striping > - > map_spin; - test_striped< map_spin >(); - - // Resizing policy - CPPUNIT_MESSAGE( "load_factor_resizing<0>(1024)"); - { - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<0> > - > map_less_resizing_lf; - map_less_resizing_lf m(30, cc::striped_set::load_factor_resizing<0>(1024)); - test_striped_with(m); - } - - CPPUNIT_MESSAGE( "load_factor_resizing<256>"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - > map_less_resizing_lf16; - test_striped< map_less_resizing_lf16 >(); - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<0>(1024)"); - { - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::compare< cmp > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<0> > - > map_less_resizing_sbt; - map_less_resizing_sbt m(30, cc::striped_set::single_bucket_size_threshold<0>(1024)); - test_striped_with(m); - } - - CPPUNIT_MESSAGE( "single_bucket_size_threshold<256>"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::single_bucket_size_threshold<256> > - > map_less_resizing_sbt16; - test_striped< map_less_resizing_sbt16 >(); - - // Copy policy - CPPUNIT_MESSAGE( "load_factor_resizing<256>, copy_item"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::copy_item > - > set_copy_item; - test_striped< set_copy_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, swap_item"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::swap_item > - > set_swap_item; - test_striped< set_swap_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, move_item"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< cc::striped_set::move_item > - > set_move_item; - test_striped< set_move_item >(); - - CPPUNIT_MESSAGE( "load_factor_resizing<256>, special copy_policy"); - typedef cc::StripedMap< map_t - , co::hash< hash_int > - , co::less< less > - , co::resizing_policy< cc::striped_set::load_factor_resizing<256> > - , co::copy_policy< my_copy_policy > - > set_special_copy_item; - test_striped< set_special_copy_item >(); - } - -} // namespace map - -#endif // #if CDS_COMPILER == CDS_COMPILER_MSVC && CDS_COMPILER_VERSION < 1600 diff --git a/tests/test-hdr/ordered_list/hdr_lazy.h b/tests/test-hdr/ordered_list/hdr_lazy.h index 360b43c1..9fc3d5d7 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy.h +++ b/tests/test-hdr/ordered_list/hdr_lazy.h @@ -106,7 +106,7 @@ namespace ordlist { } }; struct dummy_insert_functor { - void operator ()( item& i ) + void operator ()( item& /*i*/ ) { // This functor should not be called TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_functor should not be called", __FILE__, __LINE__ ); @@ -117,7 +117,7 @@ namespace ordlist { { i.nVal = i.nKey * 1024; } - static void dummy_insert_function( item& i ) + static void dummy_insert_function( item& /*i*/ ) { // This function should not be called TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_function should not be called", __FILE__, __LINE__ ); @@ -171,7 +171,7 @@ namespace ordlist { }; struct dummy_check_value { - void operator()( item& i, int ) + void operator()( item& /*i*/, int ) { // This functor should not be called TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_check_value should not be called", __FILE__, __LINE__ ); @@ -179,13 +179,13 @@ namespace ordlist { }; struct ensure_functor { - void operator()( bool bNew, item& i, int n ) + void operator()( bool /*bNew*/, item& i, int n ) { i.nVal = i.nKey * 1024; } }; - static void ensure_func( bool bNew, item& i, int n ) + static void ensure_func( bool /*bNew*/, item& i, int n ) { i.nVal = n * 1033; } diff --git a/tests/test-hdr/ordered_list/hdr_lazy_kv.h b/tests/test-hdr/ordered_list/hdr_lazy_kv.h index 5c6bbdb0..bbe85da1 100644 --- a/tests/test-hdr/ordered_list/hdr_lazy_kv.h +++ b/tests/test-hdr/ordered_list/hdr_lazy_kv.h @@ -66,7 +66,7 @@ namespace ordlist { struct ensure_functor { template - void operator()( bool bNew, T& pair ) + void operator()( bool /*bNew*/, T& pair ) { pair.second.m_val = pair.first * 50; } diff --git a/tests/test-hdr/ordered_list/hdr_michael.h b/tests/test-hdr/ordered_list/hdr_michael.h index 314df8cc..5ce56fc0 100644 --- a/tests/test-hdr/ordered_list/hdr_michael.h +++ b/tests/test-hdr/ordered_list/hdr_michael.h @@ -106,7 +106,7 @@ namespace ordlist { } }; struct dummy_insert_functor { - void operator ()( item& i ) + void operator ()( item& /*i*/ ) { // This functor should not be called TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_functor should not be called", __FILE__, __LINE__ ); @@ -130,7 +130,7 @@ namespace ordlist { { i.nVal = i.nKey * 1024; } - static void dummy_insert_function( item& i ) + static void dummy_insert_function( item& /*i*/ ) { // This function should not be called TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_insert_function should not be called", __FILE__, __LINE__ ); @@ -172,7 +172,7 @@ namespace ordlist { }; struct dummy_check_value { - void operator()( item& i, int ) + void operator()( item& /*i*/, int ) { // This functor should not be called TestCase::current_test()->error( "CPPUNIT_ASSERT", "dummy_check_value should not be called", __FILE__, __LINE__ ); @@ -180,13 +180,13 @@ namespace ordlist { }; struct ensure_functor { - void operator()( bool bNew, item& i, int n ) + void operator()( bool /*bNew*/, item& i, int n ) { i.nVal = i.nKey * 1024; } }; - static void ensure_func( bool bNew, item& i, int n ) + static void ensure_func( bool /*bNew*/, item& i, int n ) { i.nVal = n * 1033; } diff --git a/tests/test-hdr/ordered_list/hdr_michael_kv.h b/tests/test-hdr/ordered_list/hdr_michael_kv.h index 49ff561a..68e9b921 100644 --- a/tests/test-hdr/ordered_list/hdr_michael_kv.h +++ b/tests/test-hdr/ordered_list/hdr_michael_kv.h @@ -66,7 +66,7 @@ namespace ordlist { struct ensure_functor { template - void operator()( bool bNew, T& pair ) + void operator()( bool /*bNew*/, T& pair ) { pair.second.m_val = pair.first * 50; } diff --git a/tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h b/tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h index 2e7f8671..aafa82c5 100644 --- a/tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h +++ b/tests/test-hdr/priority_queue/hdr_intrusive_pqueue.h @@ -20,7 +20,7 @@ namespace priority_queue { : m_nCallCount(0) {} template - void operator()( T& p ) + void operator()( T& ) { ++m_nCallCount; } diff --git a/tests/test-hdr/priority_queue/hdr_pqueue.h b/tests/test-hdr/priority_queue/hdr_pqueue.h index c9cac170..5a03d54a 100644 --- a/tests/test-hdr/priority_queue/hdr_pqueue.h +++ b/tests/test-hdr/priority_queue/hdr_pqueue.h @@ -21,7 +21,7 @@ namespace priority_queue { {} template - void operator()( T& p ) + void operator()( T& ) { ++m_nCallCount; } diff --git a/tests/test-hdr/set/hdr_intrusive_set.h b/tests/test-hdr/set/hdr_intrusive_set.h index aae9cbe3..fa06ddbb 100644 --- a/tests/test-hdr/set/hdr_intrusive_set.h +++ b/tests/test-hdr/set/hdr_intrusive_set.h @@ -193,7 +193,7 @@ namespace set { struct find_functor { template - void operator()( Item& item, T& val ) + void operator()( Item& item, T& /*val*/ ) { ++item.nFindCount; } @@ -211,7 +211,7 @@ namespace set { struct ensure_functor { template - void operator()( bool bNew, Item& item, Item& val ) + void operator()( bool bNew, Item& item, Item& /*val*/ ) { if ( bNew ) ++item.nEnsureNewCount; diff --git a/tests/test-hdr/set/hdr_set.h b/tests/test-hdr/set/hdr_set.h index a546eb47..d08ce90b 100644 --- a/tests/test-hdr/set/hdr_set.h +++ b/tests/test-hdr/set/hdr_set.h @@ -284,12 +284,12 @@ namespace set { struct find_functor { template - void operator()( Item& i, T& val ) + void operator()( Item& i, T& /*val*/ ) const { ++i.nFindCount; } template - void operator()( Item& i, T const& val ) + void operator()( Item& i, T const& /*val*/ ) const { ++i.nFindCount; } diff --git a/tests/unit/michael_alloc.h b/tests/unit/michael_alloc.h index 0a4168f1..74543870 100644 --- a/tests/unit/michael_alloc.h +++ b/tests/unit/michael_alloc.h @@ -28,13 +28,13 @@ namespace memory { typedef typename std_allocator::value_type value_type; // Allocation function - pointer allocate( size_type _Count, const void* _Hint = nullptr ) + pointer allocate( size_type _Count, const void* /*_Hint*/ = nullptr ) { return reinterpret_cast( s_MichaelHeap.alloc( sizeof(T) * _Count )); } // Deallocation function - void deallocate( pointer _Ptr, size_type _Count ) + void deallocate( pointer _Ptr, size_type /*_Count*/ ) { s_MichaelHeap.free( _Ptr ); } diff --git a/tests/unit/print_cuckoo_stat.h b/tests/unit/print_cuckoo_stat.h index 544e6703..c1308f08 100644 --- a/tests/unit/print_cuckoo_stat.h +++ b/tests/unit/print_cuckoo_stat.h @@ -18,7 +18,7 @@ namespace std { << "\t\t m_nResizeCount: " << s.m_nResizeCount.get() << "\n" ; } - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_striping_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_striping_stat const& /*s*/ ) { return o; } diff --git a/tests/unit/print_ellenbintree_stat.h b/tests/unit/print_ellenbintree_stat.h index 19feff9f..d0adf43e 100644 --- a/tests/unit/print_ellenbintree_stat.h +++ b/tests/unit/print_ellenbintree_stat.h @@ -7,7 +7,7 @@ #include namespace std { - static inline ostream& operator <<( ostream& o, cds::intrusive::ellen_bintree::empty_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::ellen_bintree::empty_stat const& /*s*/ ) { return o; } diff --git a/tests/unit/print_mspriorityqueue_stat.h b/tests/unit/print_mspriorityqueue_stat.h index ba3571b8..39d2595c 100644 --- a/tests/unit/print_mspriorityqueue_stat.h +++ b/tests/unit/print_mspriorityqueue_stat.h @@ -6,7 +6,7 @@ #include namespace std { - static inline ostream& operator <<( ostream& o, cds::container::mspriority_queue::empty_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::container::mspriority_queue::empty_stat const& /*s*/ ) { return o; } diff --git a/tests/unit/print_segmentedqueue_stat.h b/tests/unit/print_segmentedqueue_stat.h index 5d9373eb..834e9212 100644 --- a/tests/unit/print_segmentedqueue_stat.h +++ b/tests/unit/print_segmentedqueue_stat.h @@ -21,7 +21,7 @@ namespace std { << "\t Segment deleted: " << s.m_nSegmentDeleted.get() << "\n"; } - static inline ostream& operator <<( ostream& o, cds::intrusive::segmented_queue::empty_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::segmented_queue::empty_stat const& /*s*/ ) { return o; } diff --git a/tests/unit/print_skip_list_stat.h b/tests/unit/print_skip_list_stat.h index 7e40c1cc..ae7effb2 100644 --- a/tests/unit/print_skip_list_stat.h +++ b/tests/unit/print_skip_list_stat.h @@ -11,8 +11,8 @@ namespace std { static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::stat<> const& s ) { o << "Skip-list stat [cds::intrusive::skip_list::stat]\n" - << "\t\t node height (add/delete):\n" -; + << "\t\t node height (add/delete):\n"; + for ( unsigned int i = 0; i < 9; ++i ) o << "\t\t\t[ " << (i + 1) << "]: " << s.m_nNodeHeightAdd[i].get() << '/' << s.m_nNodeHeightDel[i].get() << "\n"; for ( unsigned int i = 9; i < sizeof(s.m_nNodeHeightAdd) / sizeof(s.m_nNodeHeightAdd[0] ); ++i ) @@ -52,7 +52,7 @@ namespace std { << "\t\t m_nExtractWhileFind: " << s.m_nExtractWhileFind.get() << "\n"; } - static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::empty_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::skip_list::empty_stat const& /*s*/ ) { return o; } diff --git a/tests/unit/print_split_list_stat.h b/tests/unit/print_split_list_stat.h index 94b7530f..8275d8d6 100644 --- a/tests/unit/print_split_list_stat.h +++ b/tests/unit/print_split_list_stat.h @@ -29,7 +29,7 @@ namespace std { << "\t\t m_nBusyWaitBucketInit: " << s.m_nBusyWaitBucketInit.get() << "\n"; } - static inline ostream& operator <<( ostream& o, cds::intrusive::split_list::empty_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::split_list::empty_stat const& /*s*/ ) { return o; }