[vlc-devel] [PATCH 2/3] configure: add -Werror=incompatible-pointer-types option to the compiler

Steve Lhomme robux4 at ycbcr.xyz
Wed Dec 18 11:51:50 CET 2019


On 2019-12-18 11:47, Alexandre Janniaux wrote:
> Hi,
> 
> On Wed, Dec 18, 2019 at 11:28:47AM +0100, Steve Lhomme wrote:
>> On 2019-12-18 11:00, RĂ©mi Denis-Courmont wrote:
>>> As was pointed out earlier, missing function prototypes always lead to
>>> bugs, as parameters are down-converted to int. Now it's even worse
>>> because it also breaks CFI.
>>>
>>> But missing initialisers are not always or almost always a bug.
>>> Sometimes they are and sometimes, they're not.
>>
>> And how do you tell if they are a bug or not ? I think forcing the author to
>> use NULL is a good way to having wondering. With a comment if it needs to be
>> later attended.
> 
> I think that in C, you have no other way than correct reviews
> process and tooling, and good quality base code.

I just proposed a way to enforce correctness, but it's opt-in.


More information about the vlc-devel mailing list