[vlc-devel] [PATCH] configure: fail on casting incompatible pointers

Rémi Denis-Courmont remi at remlab.net
Wed Oct 2 13:03:26 CEST 2019


Yes and so this patch is not just harmful, but it's redundant with code reviews.

Le 2 octobre 2019 13:26:22 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2019-10-02 12:18, Rémi Denis-Courmont wrote:
>> Next people will add incorrect manual casts to silence the errors 
>> instead of fixing them properly. Not a good idea.
>
>We have code review for that.
>Using a cast to silence an error is no different than using a cast to 
>silence a warning. In both case it's wrong and we shouldn't do it.
>
>> Le 2 octobre 2019 13:14:14 GMT+03:00, Romain Vimont
><rom1v at videolabs.io> 
>> a écrit :
>> 
>>    
>------------------------------------------------------------------------
>>       configure.ac | 2 +-
>>       1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>>     diff --git a/configure.ac b/configure.ac
>>     index 210b4ca537..2fa70daf22 100644
>>     --- a/configure.ac
>>     +++ b/configure.ac
>>     @@ -988,7 +988,7 @@ dnl
>>       AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef
>-Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security
>-Wduplicated-branches -Wduplicated-cond], [CFLAGS])
>>       AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef
>-Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security
>-Wduplicated-branches -Wduplicated-cond], [CXXFLAGS])
>>       
>>     -AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast -Wwrite-strings
>-Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self
>-Wlogical-op -Wshadow=local -Wmultistatement-macros], [CFLAGS])
>>     +AX_APPEND_COMPILE_FLAGS([-Wbad-function-cast -Wwrite-strings
>-Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self
>-Wlogical-op -Wshadow=local -Wmultistatement-macros
>-Werror=incompatible-pointer-types], [CFLAGS])
>>       AX_APPEND_COMPILE_FLAGS([-pipe], [CFLAGS])
>>       
>>       dnl
>> 
>> 
>> -- 
>> Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez
>excuser 
>> ma brièveté.
>> 
>> _______________________________________________
>> vlc-devel mailing list
>> To unsubscribe or modify your subscription options:
>> https://mailman.videolan.org/listinfo/vlc-devel
>> 
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel

-- 
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/20191002/47e629e0/attachment.html>


More information about the vlc-devel mailing list