On Wed, Apr 25, 2012 at 03:28:20PM +0200, Stef Walter wrote:
On 04/24/2012 12:42 PM, Sumit Bose wrote:
> Chances are that some static code analysis tools or -D_FORTIFY_SOURCE=2
> might complain about an unchecked return value. Currently we mostly try
> to make those tools happy, even if the code becomes a bit redundant.
>
> Have you checked if -D_FORTIFY_SOURCE=2 gives an extra warning here?
Do I just define that macro? ie:
$ CFLAGS='-g -O0 -D_FORTIFY_SOURCE=2' ./configure ...
yes, this is ok. Typically it is used as -Wp,-D_FORTIFY_SOURCE=2, but
your usage would work as well.
If that's the case, then no, no additional warnings were generated.
ok, thank you for testing.
bye,
Sumit
Cheers,
Stef