Fixed UBsan warning "call to function through pointer to incorrect function type"
[libcds.git] / cds / urcu / signal_buffered.h
index df5d36bab63b53ba33b41ab49c43e4cc8e8f7e82..1ba5bab6792fadc597e84b8789744138dff7c37f 100644 (file)
@@ -103,9 +103,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 );
         }
 
@@ -114,7 +114,7 @@ namespace cds { namespace urcu {
             If the buffer is full, \ref synchronize function is invoked.
         */
         template <typename Disposer, typename T>
-        static void retire_ptr( T * p )
+        static void retire_ptr( T* p )
         {
             retire_ptr( p, cds::details::static_functor<Disposer, T>::call );
         }