From f4d56635f899073e5dd2b83c208aabf793031861 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 19 Nov 2014 09:50:57 +0300 Subject: [PATCH] Remove 'unused vars' warnings --- cds/intrusive/cuckoo_set.h | 7 +++++- cds/intrusive/details/lazy_list_base.h | 1 + cds/intrusive/details/michael_list_base.h | 1 + cds/intrusive/details/single_link_struct.h | 1 + cds/intrusive/ellen_bintree_rcu.h | 6 ++++++ cds/intrusive/impl/ellen_bintree.h | 5 +++++ cds/intrusive/impl/lazy_list.h | 7 ++++++ cds/intrusive/impl/michael_list.h | 7 ++++++ cds/intrusive/lazy_list_nogc.h | 3 +++ cds/intrusive/lazy_list_rcu.h | 8 ++++++- cds/intrusive/michael_list_nogc.h | 3 +++ cds/intrusive/michael_list_rcu.h | 7 ++++++ cds/intrusive/optimistic_queue.h | 1 + cds/memory/pool_allocator.h | 2 +- cds/memory/vyukov_queue_pool.h | 2 ++ cds/opt/hash.h | 2 +- tests/test-hdr/misc/michael_allocator.h | 24 ++++++++++----------- tests/test-hdr/ordered_list/hdr_michael.h | 2 +- tests/test-hdr/set/hdr_cuckoo_set.h | 4 ++-- tests/test-hdr/set/hdr_striped_set.h | 4 ++-- tests/test-hdr/tree/hdr_ellenbintree_set.h | 4 ++-- tests/test-hdr/tree/hdr_intrusive_bintree.h | 4 ++-- tests/unit/print_cuckoo_stat.h | 4 ++-- 23 files changed, 82 insertions(+), 27 deletions(-) diff --git a/cds/intrusive/cuckoo_set.h b/cds/intrusive/cuckoo_set.h index 7ba7b00c..aa0e2442 100644 --- a/cds/intrusive/cuckoo_set.h +++ b/cds/intrusive/cuckoo_set.h @@ -1538,7 +1538,7 @@ namespace cds { namespace intrusive { struct contains { template - static bool find( BucketEntry& probeset, Position& pos, unsigned int nTable, size_t nHash, Q const& val, Compare cmp ) + static bool find( BucketEntry& probeset, Position& pos, unsigned int /*nTable*/, size_t /*nHash*/, Q const& val, Compare cmp ) { // Ordered version typedef typename BucketEntry::iterator bucket_iterator; @@ -2576,6 +2576,7 @@ namespace cds { namespace intrusive { template value_type * erase_with( Q const& val, Predicate pred ) { + CDS_UNUSED( pred ); return erase_( val, typename predicate_wrapper::type(), [](value_type const&) {} ); } @@ -2612,6 +2613,7 @@ namespace cds { namespace intrusive { template value_type * erase_with( Q const& val, Predicate pred, Func f ) { + CDS_UNUSED( pred ); return erase_( val, typename predicate_wrapper::type(), f ); } @@ -2653,6 +2655,7 @@ namespace cds { namespace intrusive { template bool find_with( Q& val, Predicate pred, Func f ) { + CDS_UNUSED( pred ); return find_( val, typename predicate_wrapper::type(), f ); } @@ -2691,6 +2694,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& val, Predicate pred, Func f ) { + CDS_UNUSED( pred ); return find_( val, typename predicate_wrapper::type(), f ); } @@ -2719,6 +2723,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& val, Predicate pred ) { + CDS_UNUSED( pred ); return find_with( val, typename predicate_wrapper::type(), [](value_type& , Q const& ) {} ); } diff --git a/cds/intrusive/details/lazy_list_base.h b/cds/intrusive/details/lazy_list_base.h index e348eac5..c8339342 100644 --- a/cds/intrusive/details/lazy_list_base.h +++ b/cds/intrusive/details/lazy_list_base.h @@ -147,6 +147,7 @@ namespace cds { namespace intrusive { static void is_empty( node_type const * pNode ) { assert( pNode->m_pNext.load( atomics::memory_order_relaxed ) == nullptr ); + CDS_UNUSED( pNode ); } }; diff --git a/cds/intrusive/details/michael_list_base.h b/cds/intrusive/details/michael_list_base.h index a3f79441..023714a3 100644 --- a/cds/intrusive/details/michael_list_base.h +++ b/cds/intrusive/details/michael_list_base.h @@ -128,6 +128,7 @@ namespace cds { namespace intrusive { static void is_empty( const node_type * pNode ) { assert( pNode->m_pNext.load( atomics::memory_order_relaxed ) == nullptr ); + CDS_UNUSED( pNode ); } }; diff --git a/cds/intrusive/details/single_link_struct.h b/cds/intrusive/details/single_link_struct.h index 2b02e797..b783cc06 100644 --- a/cds/intrusive/details/single_link_struct.h +++ b/cds/intrusive/details/single_link_struct.h @@ -118,6 +118,7 @@ namespace cds { namespace intrusive { static void is_empty( const node_type * pNode ) { assert( pNode->m_pNext.load( atomics::memory_order_relaxed ) == nullptr ); + CDS_UNUSED( pNode ); } }; diff --git a/cds/intrusive/ellen_bintree_rcu.h b/cds/intrusive/ellen_bintree_rcu.h index 20ec705d..cdaa96ea 100644 --- a/cds/intrusive/ellen_bintree_rcu.h +++ b/cds/intrusive/ellen_bintree_rcu.h @@ -900,6 +900,7 @@ namespace cds { namespace intrusive { template bool erase_with( const Q& key, Less pred ) { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -951,6 +952,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -1072,6 +1074,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -1169,6 +1172,7 @@ namespace cds { namespace intrusive { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -1640,6 +1644,7 @@ namespace cds { namespace intrusive { template value_type * extract_with_( Q const& val, Less pred ) { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -1846,6 +1851,7 @@ namespace cds { namespace intrusive { template bool find_with_( Q& val, Less pred, Func f ) const { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, diff --git a/cds/intrusive/impl/ellen_bintree.h b/cds/intrusive/impl/ellen_bintree.h index 0b6ec56e..dbcafc11 100644 --- a/cds/intrusive/impl/ellen_bintree.h +++ b/cds/intrusive/impl/ellen_bintree.h @@ -485,6 +485,7 @@ namespace cds { namespace intrusive { template bool erase_with( const Q& key, Less pred ) { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -534,6 +535,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -655,6 +657,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -1336,6 +1339,7 @@ namespace cds { namespace intrusive { template bool extract_with_( typename guarded_ptr::native_guard& guard, Q const& key, Less pred ) { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, @@ -1467,6 +1471,7 @@ namespace cds { namespace intrusive { template bool find_with_( Q& val, Less pred, Func f ) const { + CDS_UNUSED( pred ); typedef ellen_bintree::details::compare< key_type, value_type, diff --git a/cds/intrusive/impl/lazy_list.h b/cds/intrusive/impl/lazy_list.h index f2c9eaf6..269fa348 100644 --- a/cds/intrusive/impl/lazy_list.h +++ b/cds/intrusive/impl/lazy_list.h @@ -596,6 +596,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( &m_Head, key, cds::opt::details::make_comparator_from_less() ); } @@ -628,6 +629,7 @@ namespace cds { namespace intrusive { template bool erase_with( const Q& key, Less pred, Func func ) { + CDS_UNUSED( pred ); return erase_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), func ); } @@ -678,6 +680,7 @@ namespace cds { namespace intrusive { template guarded_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); guarded_ptr gp; extract_at( &m_Head, gp.guard(), key, cds::opt::details::make_comparator_from_less() ); return gp; @@ -722,12 +725,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( &m_Head, 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_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -753,6 +758,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less() ); } @@ -805,6 +811,7 @@ namespace cds { namespace intrusive { template guarded_ptr get_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); guarded_ptr gp; get_at( &m_Head, gp.guard(), key, cds::opt::details::make_comparator_from_less() ); return gp; diff --git a/cds/intrusive/impl/michael_list.h b/cds/intrusive/impl/michael_list.h index 5f039362..103e5ac7 100644 --- a/cds/intrusive/impl/michael_list.h +++ b/cds/intrusive/impl/michael_list.h @@ -596,6 +596,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( m_pHead, key, cds::opt::details::make_comparator_from_less()); } @@ -627,6 +628,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return erase_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); } @@ -677,6 +679,7 @@ namespace cds { namespace intrusive { template guarded_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); guarded_ptr gp; extract_at( m_pHead, gp.guard(), key, cds::opt::details::make_comparator_from_less() ); return gp; @@ -726,12 +729,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( m_pHead, 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_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -757,6 +762,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less() ); } @@ -809,6 +815,7 @@ namespace cds { namespace intrusive { template guarded_ptr get_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); guarded_ptr gp; get_at( m_pHead, gp.guard(), key, cds::opt::details::make_comparator_from_less() ); return gp; diff --git a/cds/intrusive/lazy_list_nogc.h b/cds/intrusive/lazy_list_nogc.h index 1faed75e..12d82851 100644 --- a/cds/intrusive/lazy_list_nogc.h +++ b/cds/intrusive/lazy_list_nogc.h @@ -402,12 +402,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( &m_Head, 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_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -433,6 +435,7 @@ namespace cds { namespace intrusive { template value_type * find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less() ); } diff --git a/cds/intrusive/lazy_list_rcu.h b/cds/intrusive/lazy_list_rcu.h index 0d89f940..81b5512e 100644 --- a/cds/intrusive/lazy_list_rcu.h +++ b/cds/intrusive/lazy_list_rcu.h @@ -535,10 +535,10 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( &m_Head, key, cds::opt::details::make_comparator_from_less()); } - /// Deletes the item from the list /** \anchor cds_intrusive_LazyList_rcu_find_erase_func The function searches an item with key equal to \p key in the list, @@ -574,6 +574,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func func ) { + CDS_UNUSED( pred ); return erase_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), func ); } @@ -637,6 +638,7 @@ namespace cds { namespace intrusive { template exempt_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( extract_at( &m_Head, key, cds::opt::details::make_comparator_from_less() )); } @@ -680,12 +682,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( const_cast( &m_Head ), key, cds::opt::details::make_comparator_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( const_cast(&m_Head), key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -711,6 +715,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return find_at( const_cast( &m_Head ), key, cds::opt::details::make_comparator_from_less() ); } @@ -759,6 +764,7 @@ namespace cds { namespace intrusive { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return get_at( const_cast( &m_Head ), key, cds::opt::details::make_comparator_from_less()); } diff --git a/cds/intrusive/michael_list_nogc.h b/cds/intrusive/michael_list_nogc.h index 17908a6d..2a8c3f6d 100644 --- a/cds/intrusive/michael_list_nogc.h +++ b/cds/intrusive/michael_list_nogc.h @@ -373,12 +373,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) { + CDS_UNUSED( pred ); return find_at( m_pHead, 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_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -404,6 +406,7 @@ namespace cds { namespace intrusive { template value_type * find_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less()); } diff --git a/cds/intrusive/michael_list_rcu.h b/cds/intrusive/michael_list_rcu.h index 263a2b9d..f55f8a87 100644 --- a/cds/intrusive/michael_list_rcu.h +++ b/cds/intrusive/michael_list_rcu.h @@ -436,6 +436,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return erase_at( m_pHead, key, cds::opt::details::make_comparator_from_less() ); } @@ -474,6 +475,7 @@ namespace cds { namespace intrusive { template bool erase_with( Q const& key, Less pred, Func func ) { + CDS_UNUSED( pred ); return erase_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), func ); } @@ -537,6 +539,7 @@ namespace cds { namespace intrusive { template exempt_ptr extract_with( Q const& key, Less pred ) { + CDS_UNUSED( pred ); return exempt_ptr( extract_at( m_pHead, key, cds::opt::details::make_comparator_from_less() )); } @@ -583,12 +586,14 @@ namespace cds { namespace intrusive { template bool find_with( Q& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( const_cast( m_pHead ), key, cds::opt::details::make_comparator_from_less(), f ); } //@cond template bool find_with( Q const& key, Less pred, Func f ) const { + CDS_UNUSED( pred ); return find_at( const_cast(m_pHead), key, cds::opt::details::make_comparator_from_less(), f ); } //@endcond @@ -614,6 +619,7 @@ namespace cds { namespace intrusive { template bool find_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return find_at( const_cast( m_pHead ), key, cds::opt::details::make_comparator_from_less() ); } @@ -662,6 +668,7 @@ namespace cds { namespace intrusive { template value_type * get_with( Q const& key, Less pred ) const { + CDS_UNUSED( pred ); return get_at( const_cast( m_pHead ), key, cds::opt::details::make_comparator_from_less()); } diff --git a/cds/intrusive/optimistic_queue.h b/cds/intrusive/optimistic_queue.h index f316baa2..5009efac 100644 --- a/cds/intrusive/optimistic_queue.h +++ b/cds/intrusive/optimistic_queue.h @@ -116,6 +116,7 @@ namespace cds { namespace intrusive { { assert( pNode->m_pNext.load( atomics::memory_order_relaxed ) == nullptr ); assert( pNode->m_pPrev.load( atomics::memory_order_relaxed ) == nullptr ); + CDS_UNUSED( pNode ); } }; diff --git a/cds/memory/pool_allocator.h b/cds/memory/pool_allocator.h index c7aaadfa..660fb98c 100644 --- a/cds/memory/pool_allocator.h +++ b/cds/memory/pool_allocator.h @@ -87,7 +87,7 @@ namespace cds { namespace memory { { return &x; } - pointer allocate( size_type n, void const * hint = 0) + pointer allocate( size_type n, void const * /*hint*/ = 0) { static_assert( sizeof(value_type) <= sizeof(typename accessor_type::value_type), "Incompatible type" ); diff --git a/cds/memory/vyukov_queue_pool.h b/cds/memory/vyukov_queue_pool.h index f7c3ceb5..663f1b8d 100644 --- a/cds/memory/vyukov_queue_pool.h +++ b/cds/memory/vyukov_queue_pool.h @@ -439,6 +439,7 @@ namespace cds { namespace memory { value_type * allocate( size_t n ) { assert( n == 1 ); + CDS_UNUSED( n ); value_type * p = m_Queue.pop(); if ( p ) { @@ -459,6 +460,7 @@ namespace cds { namespace memory { void deallocate( value_type * p, size_t n ) { assert( n == 1 ); + CDS_UNUSED( n ); if ( p ) { assert( from_pool( p )); diff --git a/cds/opt/hash.h b/cds/opt/hash.h index 882f6440..22f702e1 100644 --- a/cds/opt/hash.h +++ b/cds/opt/hash.h @@ -83,7 +83,7 @@ namespace cds { namespace opt { {} template - typename std::enable_if< (I == sizeof...(Functors)) >::type apply( size_t * dest, T const& v ) const + typename std::enable_if< (I == sizeof...(Functors)) >::type apply( size_t * /*dest*/, T const& /*v*/ ) const {} template diff --git a/tests/test-hdr/misc/michael_allocator.h b/tests/test-hdr/misc/michael_allocator.h index 013c2a54..1daf24b9 100644 --- a/tests/test-hdr/misc/michael_allocator.h +++ b/tests/test-hdr/misc/michael_allocator.h @@ -35,12 +35,12 @@ namespace misc { }; - pointer allocate( size_t nSize, const void * pHint ) + pointer allocate( size_t nSize, const void * /*pHint*/ ) { return reinterpret_cast( s_MichaelHeap_NoStat.alloc( sizeof(T) * nSize ) ); } - void deallocate( pointer p, size_t nCount ) + void deallocate( pointer p, size_t /*nCount*/ ) { s_MichaelHeap_NoStat.free( p ); } @@ -59,7 +59,7 @@ namespace misc { alignment = 1 }; - static void stat(summary_stat& s) + static void stat(summary_stat& /*s*/) {} }; @@ -74,12 +74,12 @@ namespace misc { alignment = 1 }; - pointer allocate( size_t nSize, const void * pHint ) + pointer allocate( size_t nSize, const void * /*pHint*/ ) { return reinterpret_cast( s_MichaelHeap_Stat.alloc( sizeof(T) * nSize ) ); } - void deallocate( pointer p, size_t nCount ) + void deallocate( pointer p, size_t /*nCount*/ ) { s_MichaelHeap_Stat.free( p ); } @@ -101,12 +101,12 @@ namespace misc { alignment = ALIGN }; - pointer allocate( size_t nSize, const void * pHint ) + pointer allocate( size_t nSize, const void * /*pHint*/ ) { return reinterpret_cast( s_MichaelHeap_NoStat.alloc_aligned( sizeof(T) * nSize, ALIGN ) ); } - void deallocate( pointer p, size_t nCount ) + void deallocate( pointer p, size_t /*nCount*/ ) { s_MichaelHeap_NoStat.free_aligned( p ); } @@ -127,12 +127,12 @@ namespace misc { alignment = ALIGN }; - pointer allocate( size_t nSize, const void * pHint ) + pointer allocate( size_t nSize, const void * /*pHint*/ ) { return reinterpret_cast( s_MichaelHeap_Stat.alloc_aligned( sizeof(T) * nSize, ALIGN ) ); } - void deallocate( pointer p, size_t nCount ) + void deallocate( pointer p, size_t /*nCount*/ ) { s_MichaelHeap_Stat.free_aligned( p ); } @@ -154,17 +154,17 @@ namespace misc { alignment = ALIGN }; - pointer allocate( size_t nSize, const void * pHint ) + pointer allocate( size_t nSize, const void * /*pHint*/ ) { return reinterpret_cast( cds::OS::aligned_malloc( sizeof(T) * nSize, ALIGN ) ); } - void deallocate( pointer p, size_t nCount ) + void deallocate( pointer p, size_t /*nCount*/ ) { cds::OS::aligned_free( p ); } - static void stat(summary_stat& s) + static void stat(summary_stat& /*s*/) {} }; diff --git a/tests/test-hdr/ordered_list/hdr_michael.h b/tests/test-hdr/ordered_list/hdr_michael.h index 4f3665df..8d3fb9a3 100644 --- a/tests/test-hdr/ordered_list/hdr_michael.h +++ b/tests/test-hdr/ordered_list/hdr_michael.h @@ -180,7 +180,7 @@ 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; } diff --git a/tests/test-hdr/set/hdr_cuckoo_set.h b/tests/test-hdr/set/hdr_cuckoo_set.h index c3f269a0..ce7d5fba 100644 --- a/tests/test-hdr/set/hdr_cuckoo_set.h +++ b/tests/test-hdr/set/hdr_cuckoo_set.h @@ -269,12 +269,12 @@ namespace set { struct find_functor { template - void operator()( Item& i, T& val ) + void operator()( Item& i, T& /*val*/ ) { ++i.nFindCount; } template - void operator()( Item& i, T const& val ) + void operator()( Item& i, T const& /*val*/ ) { ++i.nFindCount; } diff --git a/tests/test-hdr/set/hdr_striped_set.h b/tests/test-hdr/set/hdr_striped_set.h index 36d22b70..e0b5a86f 100644 --- a/tests/test-hdr/set/hdr_striped_set.h +++ b/tests/test-hdr/set/hdr_striped_set.h @@ -257,12 +257,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/test-hdr/tree/hdr_ellenbintree_set.h b/tests/test-hdr/tree/hdr_ellenbintree_set.h index 08658ef5..0e3363f0 100644 --- a/tests/test-hdr/tree/hdr_ellenbintree_set.h +++ b/tests/test-hdr/tree/hdr_ellenbintree_set.h @@ -205,12 +205,12 @@ namespace tree { struct find_functor { template - void operator()( value_type& i, T& val ) + void operator()( value_type& i, T& /*val*/ ) { ++i.stat.nFindFuncCall; } template - void operator()( value_type& i, T const& val ) + void operator()( value_type& i, T const& /*val*/ ) { ++i.stat.nFindConstFuncCall; } diff --git a/tests/test-hdr/tree/hdr_intrusive_bintree.h b/tests/test-hdr/tree/hdr_intrusive_bintree.h index 78a17c50..cf9a5ec8 100644 --- a/tests/test-hdr/tree/hdr_intrusive_bintree.h +++ b/tests/test-hdr/tree/hdr_intrusive_bintree.h @@ -230,12 +230,12 @@ namespace tree { struct find_functor { template - void operator()( T const& v, Q& q ) const + void operator()( T const& v, Q& /*q*/ ) const { ++v.stat.nFindFuncCall; } template - void operator()( T const& v, Q const& q ) const + void operator()( T const& v, Q const& /*q*/ ) const { ++v.stat.nFindConstFuncCall; } diff --git a/tests/unit/print_cuckoo_stat.h b/tests/unit/print_cuckoo_stat.h index c1308f08..e94d6618 100644 --- a/tests/unit/print_cuckoo_stat.h +++ b/tests/unit/print_cuckoo_stat.h @@ -40,7 +40,7 @@ namespace std { << "\t\t m_nResizeCount: " << s.m_nResizeCount.get() << "\n" ; } - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_refinable_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_refinable_stat const& /*s*/ ) { return o; } @@ -79,7 +79,7 @@ namespace std { ; } - static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_stat const& s ) + static inline ostream& operator <<( ostream& o, cds::intrusive::cuckoo::empty_stat const& /*s*/ ) { return o; } -- 2.34.1