[vlc-devel] [PATCH 1/8] vlc_list: Fix dummy element initialization
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Thu Dec 3 16:16:14 CET 2020
C11 (§6.7.9.1) mandates than an initializer-list contains at least an
element
---
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))
--
2.29.2
More information about the vlc-devel
mailing list