[vlc-devel] [PATCH 6/8] vlc_picture: Don't initialize a struct with a compound literal

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Dec 3 16:16:19 CET 2020


So that the code can build in C and C++
---
 include/vlc_picture.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/vlc_picture.h b/include/vlc_picture.h
index acc856d8f5..5010c2f10a 100644
--- a/include/vlc_picture.h
+++ b/include/vlc_picture.h
@@ -296,7 +296,7 @@ static inline void vlc_picture_chain_GetAndClear(vlc_picture_chain_t *in,
  */
 static inline vlc_picture_chain_t picture_GetAndResetChain(picture_t *pic)
 {
-    vlc_picture_chain_t chain = (vlc_picture_chain_t) { pic->p_next, pic->p_next };
+    vlc_picture_chain_t chain = { pic->p_next, pic->p_next };
     while ( chain.tail && chain.tail->p_next ) // find the proper tail
         chain.tail = chain.tail->p_next;
     pic->p_next = NULL;
-- 
2.29.2



More information about the vlc-devel mailing list