[vlc-devel] [vlc-commits] contrib: avoid clang warning about invalid compiler arguments

Marvin Scholz epirat07 at gmail.com
Fri Dec 20 09:35:32 CET 2019


On 20 Dec 2019, at 9:33, Steve Lhomme wrote:

> reverted as it breaks a lot of things
>
> The patch does the opposite of what it claims (turns warnings into 
> errors instead of silencing them)
>

Silencing invalid-command-line-argument would not be acceptable, as it 
means you can add invalid
argument accidentally and will never notice it and just wonder why 
things dont work the way
you expected. So this would cause a debugging nightmare when using 
additional flagsā€¦

> On 2019-12-20 8:35, Steve Lhomme wrote:
>> vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Dec 17 
>> 14:56:41 2019 +0100| [ca519b976452f53e5cff4819d3148d74a3da6eb8] | 
>> committer: Steve Lhomme
>>
>> contrib: avoid clang warning about invalid compiler arguments
>>
>> They may be targeted at gcc and don't know about clang.
>>
>>> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ca519b976452f53e5cff4819d3148d74a3da6eb8
>> ---
>>
>>   contrib/src/main.mak | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
>> index 7d701626ba..4425ab3f1d 100644
>> --- a/contrib/src/main.mak
>> +++ b/contrib/src/main.mak
>> @@ -183,6 +183,7 @@ endif
>>    ifneq ($(findstring clang, $(shell $(CC) --version 2>/dev/null)),)
>>   HAVE_CLANG := 1
>> +EXTRA_CFLAGS += -Werror=invalid-command-line-argument
>>   endif
>>    cppcheck = $(shell $(CC) $(CFLAGS) -E -dM - < /dev/null | grep -E 
>> $(1))
>>
>> _______________________________________________
>> vlc-commits mailing list
>> vlc-commits at videolan.org
>> https://mailman.videolan.org/listinfo/vlc-commits
>>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list