[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: disabling warn_unused_result attribute with FORTIFY_SOURCE?



Matthew Miller <mattdm <at> mattdm.org> writes:
> Unlike other warnings, though, there doesn't seem to be a way to turn it
> off. Is there one I'm missing?

The _easy_ way to get rid of the warnings is to cast the unused results to 
void. The _right_ way to get rid of them is to actually _do_ something with the 
results, except in cases where it _really_ doesn't matter (e.g. because you 
already errored and are just trying to clean up or output/log error messages 
before the exit(1)).

        Kevin Kofler


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]