[vlc-devel] [PATCH 7/8] vlc_plugin.h: Cast the deactivate function pointer
Rémi Denis-Courmont
remi at remlab.net
Thu Dec 3 17:39:47 CET 2020
Le torstaina 3. joulukuuta 2020, 17.16.20 EET Hugo Beauzée-Luyssen a écrit :
> 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 ))) \
The current code will warn if the conversion makes no sense.
This won't.
-1
--
Реми Дёни-Курмон
http://www.remlab.net/
More information about the vlc-devel
mailing list