Fixed UBsan warning "call to function through pointer to incorrect function type"
[libcds.git] / cds / intrusive / impl / skip_list.h
index 617724307c8236b84e643cec0491799720a5a114..89f80bfc04b7d590d1ac7792a8dd0a7833ea5bc2 100644 (file)
@@ -1141,9 +1141,10 @@ namespace cds { namespace intrusive {
             return node_traits::to_value_ptr( p.ptr());
         }
 
-        static void dispose_node( value_type * pVal )
+        static void dispose_node( void* p )
         {
-            assert( pVal != nullptr );
+            assert( p != nullptr );
+            value_type* pVal = reinterpret_cast<value_type*>( p );
             typename node_builder::node_disposer()( node_traits::to_node_ptr( pVal ));
             disposer()( pVal );
         }