[vlc-commits] [Git][videolan/vlc][3.0.x] vlc_common: remove warnings on VLC_OBJECT
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sat Jun 22 14:56:32 UTC 2024
Felix Paul Kühne pushed to branch 3.0.x at VideoLAN / VLC
Commits:
ac310b4b by Alexandre Janniaux at 2024-06-22T14:25:44+00:00
vlc_common: remove warnings on VLC_OBJECT
Fix an infinite amount of warnings on Darwin:
../../include/vlc_variables.h:563:5: warning: due to lvalue conversion of the controlling expression, association of type 'const struct vlc_common_members' will never be selected because it is qualified [-Wunreachable-code-generic-assoc]
var_Create( p_obj, psz_name, VLC_VAR_STRING | VLC_VAR_DOINHERIT
^
../../include/vlc_variables.h:122:39: note: expanded from macro 'var_Create'
#define var_Create(a,b,c) var_Create( VLC_OBJECT(a), b, c )
^
../../include/vlc_common.h:481:15: note: expanded from macro 'VLC_OBJECT'
const struct vlc_common_members: (const vlc_object_t *)(&(x)->obj) \
- - - - -
1 changed file:
- include/vlc_common.h
Changes:
=====================================
include/vlc_common.h
=====================================
@@ -477,8 +477,8 @@ struct vlc_common_members
#if !defined(__cplusplus)
# define VLC_OBJECT(x) \
_Generic((x)->obj, \
- struct vlc_common_members: (vlc_object_t *)(&(x)->obj), \
- const struct vlc_common_members: (const vlc_object_t *)(&(x)->obj) \
+ vlc_object_t: (vlc_object_t *)(&(x)->obj), \
+ struct vlc_common_members: (vlc_object_t *)(x) \
)
#else
# define VLC_OBJECT( x ) ((vlc_object_t *)&(x)->obj)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ac310b4b193bd86b741308393aa8d8833a1075ae
--
This project does not include diff previews in email notifications.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/ac310b4b193bd86b741308393aa8d8833a1075ae
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list