Previous patches[1] added a warning regression by fixing the
initializer of the max_align_t[] array used in vlc_list_entry_dummy,
because a max_align_t array cannot be initialized with integers,
typically where the max_align_t is implemented as an union of multiple
types.
[1]: c4f0f96452
By providing an initializer for max_align_t, we can workaround this
limitation and initialize the array without those warnings:
../../lib/media.c:264:5: warning: suggest braces around initialization of subobject [-Wmissing-braces]
vlc_list_foreach( node, &list, node )
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/vlc_list.h:263:23: note: expanded from macro 'vlc_list_foreach'
&& ((pos) = vlc_list_entry_p((vlc_list_it__##pos).current, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/vlc_list.h:243:44: note: expanded from macro 'vlc_list_entry_p'
(0 ? (p) : (void *)(((char *)(node)) - vlc_list_offset_p(p, member)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../include/vlc_list.h:240:12: note: expanded from macro 'vlc_list_offset_p'
((p) = vlc_list_entry_dummy(p), (char *)(&(p)->member) - (char *)(p))
^~~~~~~~~~~~~~~~~~~~~~~
../../include/vlc_list.h:237:73: note: expanded from macro 'vlc_list_entry_dummy'
(0 ? (p) : ((void *)(&(max_align_t[vlc_list_entry_aligned_size(p)]){0})))
^
The macro vlc_list_foreach() declares an internal variable
vlc_list_it_XXX variable for looping, where XXX is the variable provided
by the user to receive the item.
If this name is "next", the resulting internal variable name is
"vlc_list_it_next", which conflicts with the function
vlc_list_it_next().
Add an _ to the internal variable name to prevent it.
Signed-off-by: Thomas Guillem <thomas@gllm.fr>