[vlc-devel] [PATCH 7/8] vlc_plugin.h: Cast the deactivate function pointer

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Dec 3 16:16:20 CET 2020


Instead of initializing a function pointer using a compound literal,
which might not compile in C++
---
 include/vlc_plugin.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_plugin.h b/include/vlc_plugin.h
index 63f0b3ac08..7a68c953e3 100644
--- a/include/vlc_plugin.h
+++ b/include/vlc_plugin.h
@@ -313,7 +313,7 @@ VLC_METADATA_EXPORTS
 #define set_callbacks( activate, deactivate ) \
     set_callback(activate) \
     if (vlc_module_set(VLC_MODULE_CB_CLOSE, #deactivate, \
-                       (void (*)(vlc_object_t *)){ deactivate })) \
+                       (void (*)(vlc_object_t *))( deactivate ))) \
         goto error;
 
 #define cannot_unload_broken_library( ) \
-- 
2.29.2



More information about the vlc-devel mailing list