Posted Nov 30, 2006 2:05 UTC (Thu) by ldo
In reply to: Re: _must_check
Parent article: KHB: Automating bug hunting
>Since the whole point of __attribute__((warn_unused_result)) is that
>it should be applied only to functions where it is nearly always a
>mistake to ignore the result at all, the question is academic.
On the contrary, the question is far from academic. This business of having to ignore return values by assigning them to rubbish variables (as opposed to simply casting them to void) has already infected the Linux kernel--and indeed, led to bugs there. A clean, uniform solution is needed.
to post comments)