[vlc-commits] vlc_list: Fix dummy element initialization

Hugo Beauzée-Luyssen git at videolan.org
Fri Dec 4 10:43:26 UTC 2020


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Nov 26 07:12:45 2020 -0800| [c4f0f96452453c5744b93acea4c4f939161225c3] | committer: Hugo Beauzée-Luyssen

vlc_list: Fix dummy element initialization

C11 (§6.7.9.1) mandates than an initializer-list contains at least an
element

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4f0f96452453c5744b93acea4c4f939161225c3
---

 include/vlc_list.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_list.h b/include/vlc_list.h
index bea20bfd9f..bdd70e3044 100644
--- a/include/vlc_list.h
+++ b/include/vlc_list.h
@@ -233,7 +233,7 @@ static inline void vlc_list_it_next(struct vlc_list_it *restrict it)
     ((sizeof (*(p)) + sizeof (max_align_t) - 1) / sizeof (max_align_t))
 
 #define vlc_list_entry_dummy(p) \
-    (0 ? (p) : ((void *)(&(max_align_t[vlc_list_entry_aligned_size(p)]){})))
+    (0 ? (p) : ((void *)(&(max_align_t[vlc_list_entry_aligned_size(p)]){0})))
 
 #define vlc_list_offset_p(p, member) \
     ((p) = vlc_list_entry_dummy(p), (char *)(&(p)->member) - (char *)(p))



More information about the vlc-commits mailing list