[vlc-devel] commit: signals: Return NULL at SigThread end. (Pierre d'Herbemont )

Pierre d'Herbemont pdherbemont at gmail.com
Fri Aug 21 10:40:16 CEST 2009


On Aug 21, 2009, at 8:32 AM, Rémi Denis-Courmont wrote:

> Le vendredi 21 août 2009 03:20:39 Pierre d'Herbemont, vous avez  
> écrit :
>> On Aug 21, 2009, at 1:13 AM, Rafaël Carré wrote:
>>> On Fri, 21 Aug 2009 01:10:25 +0200 (CEST)
>>>
>>> git at videolan.org (git version control) wrote:
>>>> vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> |  
>>>> Fri
>>>> Aug 21 01:09:52 2009 +0200|
>>>> [3c55f6d8bed88ca5635446cbc8ee1e85547c0ac1] | committer: Pierre
>>>>
>>>> +
>>>> +    /* Not reached */
>>>> +    return NULL;
>>>
>>> you can declare the function with __attribute__((noreturn)) and  
>>> remove
>>> the return
>>
>> The above solution is the most portable one, I think.
>
> No. Some compilers generate warning on dead code, and some compilers  
> generate
> warnings in both cases. There are no warning-free "portable"  
> solutions. The
> only portable solution is to not turn warnings into errors. In fact,  
> turning
> warnings into errors is not portable. Suck it up.

Yes. That's why we are only turning on to error specific class of  
warnings, not all warnings :-)

> This is a stupid idea, even in debug mode. If you want to enable for  
> yourself,
> it's your problem. On ARM Linux, I have unfixable warnings due to  
> alignment vs
> cast problems. With threads cancellation, I also get dummy clobber  
> warnings:
> the only solution would be to use "volatile" which is just worse  
> than getting
> a warning, IMHO. We also have warnings due to unused results from  
> glibc, in
> some cases where we actually know what we are doing.

That's why we don't enable warning on error for such warnings.

Totally unrelated, given VLC usage of fork and setjmp, is it safe to  
assume that we'll only get false positive with -Wclobber?

Pierre.




More information about the vlc-devel mailing list