Re: [exim-dev] Clang warnings for RC2

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Richard Clayton
Dátum:  
Címzett: Jeremy Harris
CC: exim-dev
Tárgy: Re: [exim-dev] Clang warnings for RC2
In message <5676E182.9090604@???>, Jeremy Harris
<jgh@???> writes

>On 20/12/15 16:43, Richard Clayton wrote:
>>
>> Once upon a time Exim used to compile without any warnings... I always
>> felt that was a mark of its quality.
>>
>> However, these days I compile it using clang and it gets quite excited.
>
>A lot of this sort of compiler-whining is thanks to compilers becoming
>more picky over time - and redefining the source language.


Maybe so, but in this case the issue was calling a function, getting a
return value and then ignoring it -- which the compiler thinks might be
a programmer error. In this case not, hence (void) tells the compiler
(and any code auditor) that you're aware of the return code and consider
it to be irrelevant.

In the second email of my series clang has actually flagged up a bug
because someone has typed != instead of |=

I will put up with a lot of "whining" for that sort of assistance. YMMV

-- 
richard @ highwayman . com                       "Nothing seems the same
                          Still you never see the change from day to day
                                And no-one notices the customs slip away"