[vlc-devel] [PATCH 3/3] configure: add -Werror=missing-field-initializers option to the compiler

Rémi Denis-Courmont remi at remlab.net
Wed Dec 18 10:04:42 CET 2019

You can't always use explicit initialisation. Some structures have partially system-dependent layout.

Le 18 décembre 2019 10:19:17 GMT+02:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2019-12-17 18:22, Rémi Denis-Courmont wrote:
>> Le tiistaina 17. joulukuuta 2019, 16.09.29 EET Steve Lhomme a écrit :
>>> This avoids leaving some fields initialized in structures that
>>> initialization (like in the video context operations). It's always
>better to
>>> set NULL (with a TODO/FIXME is needed) explicitly than forget it.
>>> Compound literal designated initializers are not affected.
>> That's great but designated initializers don't work in C++, or in
>common C/C++
>Then don't use such initializers in C++ code.
>> headers, and more generally, perfectly valid code that just wants to
>> initialize values to the default nul.
>It's better to explicitly set NULL for a callback IMO than not paying 
>attention at all in code you don't know about. That will only be found 
>in the bots if we can detect such missed code change early.
>> This does not belong as an error. Denis and I have already made the
>exact same
>> point not that long ago.
>How about an option to force extra compilation checks ?
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:

Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20191218/5a84b307/attachment.html>

More information about the vlc-devel mailing list