Removed unused vars
authorkhizmax <libcds.dev@gmail.com>
Wed, 26 Nov 2014 05:52:08 +0000 (08:52 +0300)
committerkhizmax <libcds.dev@gmail.com>
Wed, 26 Nov 2014 05:52:08 +0000 (08:52 +0300)
19 files changed:
cds/container/cuckoo_map.h
tests/test-hdr/ordered_list/hdr_intrusive_lazy.h
tests/test-hdr/ordered_list/hdr_intrusive_michael.h
tests/test-hdr/ordered_list/hdr_lazy.h
tests/unit/alloc/michael_allocator.h
tests/unit/map2/map_types.h
tests/unit/map2/std_hash_map.h
tests/unit/map2/std_map.h
tests/unit/pqueue/pqueue_type.h
tests/unit/queue/intrusive_queue_reader_writer.cpp
tests/unit/queue/intrusive_queue_type.h
tests/unit/queue/queue_type.h
tests/unit/set2/set_delodd.cpp
tests/unit/set2/set_insdel_func.h
tests/unit/set2/set_types.h
tests/unit/stack/intrusive_stack_type.h
tests/unit/stack/stack_intrusive_pushpop.cpp
tests/unit/stack/stack_pushpop.cpp
tests/unit/stack/stack_type.h

index cf15043..1188555 100644 (file)
@@ -550,6 +550,7 @@ namespace cds { namespace container {
         template <typename K, typename Predicate>
         bool erase_with( K const& key, Predicate pred )
         {
+            CDS_UNUSED( pred );
             node_type * pNode = base_class::erase_with(key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>());
             if ( pNode ) {
                 free_node( pNode );
@@ -598,6 +599,7 @@ namespace cds { namespace container {
         template <typename K, typename Predicate, typename Func>
         bool erase_with( K const& key, Predicate pred, Func f )
         {
+            CDS_UNUSED( pred );
             node_type * pNode = base_class::erase_with( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>() );
             if ( pNode ) {
                 f( pNode->m_val );
@@ -640,6 +642,7 @@ namespace cds { namespace container {
         template <typename K, typename Predicate, typename Func>
         bool find_with( K const& key, Predicate pred, Func f )
         {
+            CDS_UNUSED( pred );
             return base_class::find_with( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>(),
                 [&f](node_type& item, K const& ) { f( item.m_val );});
         }
@@ -667,6 +670,7 @@ namespace cds { namespace container {
         template <typename K, typename Predicate>
         bool find_with( K const& key, Predicate pred )
         {
+            CDS_UNUSED( pred );
             return base_class::find_with( key, cds::details::predicate_wrapper<node_type, Predicate, key_accessor>() );
         }
 
index a07c6b5..8402f73 100644 (file)
@@ -173,7 +173,7 @@ namespace ordlist {
         struct ensure_functor
         {
             template <typename T>
-            void operator ()(bool bNew, T& item, T& val )
+            void operator ()(bool bNew, T& item, T& /*val*/ )
             {
                 if ( bNew )
                     ++item.s.nEnsureNewCall;
@@ -185,7 +185,7 @@ namespace ordlist {
         struct find_functor
         {
             template <typename T, typename Q>
-            void operator ()( T& item, Q& val )
+            void operator ()( T& item, Q& /*val*/ )
             {
                 ++item.s.nFindCall;
             }
index 606d7f3..52c7173 100644 (file)
@@ -173,7 +173,7 @@ namespace ordlist {
         struct ensure_functor
         {
             template <typename T>
-            void operator ()(bool bNew, T& item, T& val )
+            void operator ()(bool bNew, T& item, T& /*val*/ )
             {
                 if ( bNew )
                     ++item.s.nEnsureNewCall;
@@ -185,7 +185,7 @@ namespace ordlist {
         struct find_functor
         {
             template <typename T, typename Q>
-            void operator ()( T& item, Q& val )
+            void operator ()( T& item, Q& /*val*/ )
             {
                 ++item.s.nFindCall;
             }
index 0b6bde9..28c3888 100644 (file)
@@ -179,7 +179,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;
             }
index 7ef01a6..4b4c54a 100644 (file)
@@ -35,12 +35,12 @@ namespace memory {
         };
 
 
-        pointer allocate( size_t nSize, const void * pHint )
+        pointer allocate( size_t nSize, const void * /*pHint*/ )
         {
             return reinterpret_cast<pointer>( 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 memory {
             alignment = 1
         };
 
-        static void stat(summary_stat& s)
+        static void stat(summary_stat& /*s*/)
         {}
     };
 
@@ -74,12 +74,12 @@ namespace memory {
             alignment = 1
         };
 
-        pointer allocate( size_t nSize, const void * pHint )
+        pointer allocate( size_t nSize, const void * /*pHint*/ )
         {
             return reinterpret_cast<pointer>( 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 memory {
             alignment = ALIGN
         };
 
-        pointer allocate( size_t nSize, const void * pHint )
+        pointer allocate( size_t nSize, const void * /*pHint*/ )
         {
             return reinterpret_cast<pointer>( 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 memory {
             alignment = ALIGN
         };
 
-        pointer allocate( size_t nSize, const void * pHint )
+        pointer allocate( size_t nSize, const void * /*pHint*/ )
         {
             return reinterpret_cast<pointer>( 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 memory {
             alignment = ALIGN
         };
 
-        pointer allocate( size_t nSize, const void * pHint )
+        pointer allocate( size_t nSize, const void * /*pHint*/ )
         {
             return reinterpret_cast<pointer>( 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*/)
         {}
     };
 
index c176295..44c6494 100644 (file)
@@ -127,7 +127,7 @@ namespace map2 {
         {}
 
         template <typename Q, typename Pred>
-        bool erase_with( Q const& key, Pred pred )
+        bool erase_with( Q const& key, Pred /*pred*/ )
         {
             return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
         }
@@ -1124,7 +1124,7 @@ namespace map2 {
 
             resizing_policy_t   m_placeHolder;
         public:
-            StripedHashMap_ord( size_t nCapacity, size_t nLoadFactor )
+            StripedHashMap_ord( size_t /*nCapacity*/, size_t nLoadFactor )
                 : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) )
             {}
         };
@@ -1228,7 +1228,7 @@ namespace map2 {
 
             resizing_policy_t   m_placeHolder;
         public:
-            RefinableHashMap_ord( size_t nCapacity, size_t nLoadFactor )
+            RefinableHashMap_ord( size_t /*nCapacity*/, size_t nLoadFactor )
                 : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) )
             {}
         };
@@ -1726,15 +1726,15 @@ namespace map2 {
     };
 
     template <typename Map>
-    static inline void print_stat( Map const& m )
+    static inline void print_stat( Map const& /*m*/ )
     {}
 
     template <typename Map>
-    static inline void additional_cleanup( Map& m )
+    static inline void additional_cleanup( Map& /*m*/ )
     {}
 
     template <typename Map>
-    static inline void additional_check( Map& m )
+    static inline void additional_check( Map& /*m*/ )
     {}
 
 
@@ -1763,12 +1763,12 @@ namespace map2 {
         CPPUNIT_MSG( s.statistics() );
     }
     template <typename GC, typename Key, typename T, typename Traits>
-    static inline void additional_cleanup( cc::EllenBinTreeMap<GC, Key, T, Traits>& s )
+    static inline void additional_cleanup( cc::EllenBinTreeMap<GC, Key, T, Traits>& /*s*/ )
     {
         ellen_bintree_pool::internal_node_counter::reset();
     }
     namespace ellen_bintree_check {
-        static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& s )
+        static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& /*s*/ )
         {
             // This check is not valid for thread-based RCU
             /*
index 0c80896..cb9cd40 100644 (file)
@@ -32,7 +32,7 @@ namespace map2 {
         typedef typename base_class::mapped_type value_type;
         typedef size_t      item_counter;
 
-        StdHashMap( size_t nMapSize, size_t nLoadFactor )
+        StdHashMap( size_t /*nMapSize*/, size_t /*nLoadFactor*/ )
         {}
 
         bool find( const Key& key )
index 2851744..58508cd 100644 (file)
@@ -21,7 +21,7 @@ namespace map2 {
         typedef typename base_class::value_type  pair_type;
         typedef size_t      item_counter;
 
-        StdMap( size_t nMapSize, size_t nLoadFactor )
+        StdMap( size_t /*nMapSize*/, size_t /*nLoadFactor*/ )
         {}
 
         bool find( const Key& key )
index 5c271d6..2eb0dec 100644 (file)
@@ -288,7 +288,7 @@ namespace pqueue {
 
 
     template <typename Stat>
-    static inline void check_statistics( Stat const& s )
+    static inline void check_statistics( Stat const& /*s*/ )
     {}
 
     static inline void check_statistics( cds::container::ellen_bintree::stat<> const& s )
index c6fa491..7a0c718 100644 (file)
@@ -211,7 +211,7 @@ namespace queue {
 
     protected:
         template <class Queue>
-        void analyze( CppUnitMini::ThreadPool& pool, Queue& testQueue, size_t nLeftOffset, size_t nRightOffset )
+        void analyze( CppUnitMini::ThreadPool& pool, Queue& testQueue, size_t /*nLeftOffset*/, size_t nRightOffset )
         {
             typedef Consumer<Queue> Reader;
             typedef Producer<Queue> Writer;
index 8e58825..67c30d7 100644 (file)
@@ -507,7 +507,7 @@ namespace std {
             << "\t\tAdd basket attempts: " << s.m_TryAddBasket.get() << "\n"
             << "\t\t Add basket success: " << s.m_AddBasketCount.get() << "\n";
     }
-    static inline std::ostream& operator <<(std::ostream& o, cds::intrusive::basket_queue::empty_stat const& s)
+    static inline std::ostream& operator <<(std::ostream& o, cds::intrusive::basket_queue::empty_stat const& /*s*/)
     {
         return o;
     }
@@ -525,7 +525,7 @@ namespace std {
             << "\t\t          Bad tail: " << s.m_BadTail.get() << "\n";
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::msqueue::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::msqueue::empty_stat const& /*s*/ )
     {
         return o;
     }
@@ -550,7 +550,7 @@ namespace std {
             << "\t\t     fix list call: " << s.m_FixListCount.get() << "\n";
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::optimistic_queue::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::optimistic_queue::empty_stat const& /*s*/ )
     {
         return o;
     }
@@ -577,12 +577,12 @@ namespace std {
                 << "\t      Release pub-record: " << s.m_nReleasePubRecCount.get()<< "\n";
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::fcqueue::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::fcqueue::empty_stat const& /*s*/ )
     {
         return o;
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, queue::details::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, queue::details::empty_stat const& /*s*/ )
     {
         return o;
     }
index dc2826c..818e05f 100644 (file)
@@ -544,7 +544,7 @@ namespace std {
             << "\t\tAdd basket attempts: " << s.m_TryAddBasket.get() << "\n"
             << "\t\t Add basket success: " << s.m_AddBasketCount.get() << "\n";
     }
-    static inline std::ostream& operator <<(std::ostream& o, cds::container::basket_queue::empty_stat const& s)
+    static inline std::ostream& operator <<(std::ostream& o, cds::container::basket_queue::empty_stat const& /*s*/)
     {
         return o;
     }
@@ -562,7 +562,7 @@ namespace std {
             << "\t\t          Bad tail: " << s.m_BadTail.get() << "\n";
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, cds::container::msqueue::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, cds::container::msqueue::empty_stat const& /*s*/ )
     {
         return o;
     }
@@ -587,7 +587,7 @@ namespace std {
             << "\t\t      fix list call: " << s.m_FixListCount.get() << "\n";
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::optimistic_queue::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::optimistic_queue::empty_stat const& /*s*/ )
     {
         return o;
     }
@@ -615,12 +615,12 @@ namespace std {
                 << "\t      Release pub-record: " << s.m_nReleasePubRecCount.get()<< "\n";
     }
 
-    static inline std::ostream& operator <<( std::ostream& o, cds::container::fcqueue::empty_stat const& s )
+    static inline std::ostream& operator <<( std::ostream& o, cds::container::fcqueue::empty_stat const& /*s*/ )
     {
         return o;
     }
 
-    static inline ostream& operator <<( ostream& o, cds::container::fcdeque::empty_stat const& s )
+    static inline ostream& operator <<( ostream& o, cds::container::fcdeque::empty_stat const& /*s*/ )
     {
         return o;
     }
index 25ca23d..dc2b56a 100644 (file)
@@ -128,7 +128,7 @@ namespace boost {
 namespace set2 {
 
     template <typename Set>
-    static inline void check_before_clear( Set& s )
+    static inline void check_before_clear( Set& /*s*/ )
     {}
 
     template <typename GC, typename Key, typename T, typename Traits>
@@ -161,7 +161,7 @@ namespace set2 {
             struct ensure_func
             {
                 template <typename Q>
-                void operator()( bool bNew, key_value_pair const&, Q const& )
+                void operator()( bool /*bNew*/, key_value_pair const&, Q const& )
                 {}
             };
         public:
index df0ebc0..313ba0d 100644 (file)
@@ -184,9 +184,9 @@ namespace set2 {
                     , nModified(0)
                 {}
 
-                void operator()( bool bNew, keyval_type& val, size_t nKey )
+                void operator()( bool bNew, keyval_type& val, size_t /*nKey*/ )
                 {
-                    std::unique_lock<typename value_type::lock_type>    ac( val.val.m_access );
+                    std::unique_lock<typename value_type::lock_type> ac( val.val.m_access );
                     if ( !val.val.bInitialized )
                     {
                         val.val.nKey = val.key;
index 340411b..20f54a9 100644 (file)
@@ -87,7 +87,7 @@ namespace set2 {
         {}
 
         template <typename Q, typename Pred>
-        bool erase_with( Q const& key, Pred pred )
+        bool erase_with( Q const& key, Pred /*pred*/ )
         {
             return cuckoo_base_class::erase_with( key, typename std::conditional< cuckoo_base_class::c_isSorted, Pred, typename Pred::equal_to>::type() );
         }
@@ -1014,7 +1014,7 @@ namespace set2 {
             {}
 
             template <typename Q, typename Less>
-            bool erase_with( Q const& v, Less pred )
+            bool erase_with( Q const& v, Less /*pred*/ )
             {
                 return base_class::erase( v );
             }
@@ -1038,12 +1038,12 @@ namespace set2 {
 
             resizing_policy_t   m_placeHolder;
         public:
-            StripedHashSet_ord( size_t nCapacity, size_t nLoadFactor )
+            StripedHashSet_ord( size_t /*nCapacity*/, size_t nLoadFactor )
                 : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) )
             {}
 
             template <typename Q, typename Less>
-            bool erase_with( Q const& v, Less pred )
+            bool erase_with( Q const& v, Less /*pred*/ )
             {
                 return base_class::erase( v );
             }
@@ -1142,7 +1142,7 @@ namespace set2 {
             {}
 
             template <typename Q, typename Less>
-            bool erase_with( Q const& v, Less pred )
+            bool erase_with( Q const& v, Less /*pred*/ )
             {
                 return base_class::erase( v );
             }
@@ -1166,12 +1166,12 @@ namespace set2 {
 
             resizing_policy_t   m_placeHolder;
         public:
-            RefinableHashSet_ord( size_t nCapacity, size_t nLoadFactor )
+            RefinableHashSet_ord( size_t /*nCapacity*/, size_t nLoadFactor )
                 : base_class( 0, *(new(&m_placeHolder) resizing_policy_t( nLoadFactor * 1024 )) )
             {}
 
             template <typename Q, typename Less>
-            bool erase_with( Q const& v, Less pred )
+            bool erase_with( Q const& v, Less /*pred*/ )
             {
                 return base_class::erase( v );
             }
@@ -1723,7 +1723,7 @@ namespace set2 {
     // *************************************************
 
     template <typename Set>
-    static inline void print_stat( Set const& s )
+    static inline void print_stat( Set const& /*s*/ )
     {}
 
     template <typename GC, typename T, typename Traits>
@@ -1763,15 +1763,15 @@ namespace set2 {
     //*******************************************************
 
     template <typename Set>
-    static inline void additional_check( Set& set )
+    static inline void additional_check( Set& /*set*/ )
     {}
 
     template <typename Set>
-    static inline void additional_cleanup( Set& set )
+    static inline void additional_cleanup( Set& /*set*/ )
     {}
 
     namespace ellen_bintree_check {
-        static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& s )
+        static inline void check_stat( cds::intrusive::ellen_bintree::empty_stat const& /*s*/ )
         {
             // Not true for threaded RCU
             /*
@@ -1801,7 +1801,7 @@ namespace set2 {
     }
 
     template <typename GC, typename Key, typename T, typename Traits>
-    static inline void additional_cleanup( cc::EllenBinTreeSet<GC, Key, T, Traits>& s )
+    static inline void additional_cleanup( cc::EllenBinTreeSet<GC, Key, T, Traits>& /*s*/ )
     {
         ellen_bintree_pool::internal_node_counter::reset();
     }
index b653094..e49fbeb 100644 (file)
@@ -361,12 +361,12 @@ namespace std {
             << "\t     m_EliminationFailed: " << s.m_EliminationFailed.get()      << "\n";
     }
 
-    static inline ostream& operator <<( ostream& o, cds::intrusive::treiber_stack::empty_stat const& s )
+    static inline ostream& operator <<( ostream& o, cds::intrusive::treiber_stack::empty_stat const& /*s*/ )
     {
         return o;
     }
 
-    static inline ostream& operator <<( ostream& o, cds::intrusive::fcstack::empty_stat const& s )
+    static inline ostream& operator <<( ostream& o, cds::intrusive::fcstack::empty_stat const& /*s*/ )
     {
         return o;
     }
index 6c4aa40..4369bf1 100644 (file)
@@ -191,7 +191,7 @@ namespace istack {
         }
 
         template <class Stack>
-        void analyze( CppUnitMini::ThreadPool& pool, Stack& testStack  )
+        void analyze( CppUnitMini::ThreadPool& pool, Stack& /*testStack*/  )
         {
             size_t nPushError = 0;
             size_t nPopEmpty = 0;
index e6f8078..65f65e9 100644 (file)
@@ -156,7 +156,7 @@ namespace stack {
         }
 
         template <class Stack>
-        void analyze( CppUnitMini::ThreadPool& pool, Stack& testStack  )
+        void analyze( CppUnitMini::ThreadPool& pool, Stack& /*testStack*/  )
         {
             size_t nPushError = 0;
             size_t nPopEmpty = 0;
index 45d2167..7fd2fee 100644 (file)
@@ -407,12 +407,12 @@ namespace std {
             << "\t     m_EliminationFailed: " << s.m_EliminationFailed.get()      << "\n";
     }
 
-    static inline ostream& operator <<(ostream& o, cds::container::treiber_stack::empty_stat const& s)
+    static inline ostream& operator <<(ostream& o, cds::container::treiber_stack::empty_stat const& /*s*/)
     {
         return o;
     }
 
-    static inline ostream& operator <<( ostream& o, cds::container::fcstack::empty_stat const& s )
+    static inline ostream& operator <<( ostream& o, cds::container::fcstack::empty_stat const& /*s*/ )
     {
         return o;
     }
@@ -438,7 +438,7 @@ namespace std {
             << "\t      Release pub-record: " << s.m_nReleasePubRecCount.get()<< "\n";
     }
 
-    static inline ostream& operator <<( ostream& o, cds::container::fcdeque::empty_stat const& s )
+    static inline ostream& operator <<( ostream& o, cds::container::fcdeque::empty_stat const& /*s*/ )
     {
         return o;
     }