From e73e8e32629b8b8061ea729d79e6476c5264123b Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Fri, 21 Jun 2024 16:11:28 +0200 Subject: [PATCH] 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) \ Gbp-Pq: Name 0007-vlc_common-remove-warnings-on-VLC_OBJECT.patch --- include/vlc_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/vlc_common.h b/include/vlc_common.h index 08987858..bc689c4f 100644 --- a/include/vlc_common.h +++ b/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) -- 2.30.2