Fixed UBsan warning "call to function through pointer to incorrect function type"
[libcds.git] / cds / urcu / general_buffered.h
index b297813c5a28c2c84ec07c0de27dfa2f63905535..63d4db1ca62ad544f4be1a22ccba36725802637c 100644 (file)
@@ -97,9 +97,9 @@ namespace cds { namespace urcu {
             If the buffer is full, \ref synchronize function is invoked.
         */
         template <typename T>
-        static void retire_ptr( T * p, void (* pFunc)(T *))
+        static void retire_ptr( T * p, free_retired_ptr_func pFunc )
         {
-            retired_ptr rp( reinterpret_cast<void *>( p ), reinterpret_cast<free_retired_ptr_func>( pFunc ));
+            retired_ptr rp( p, pFunc );
             retire_ptr( rp );
         }