Re: _must_check
Posted Nov 30, 2006 2:05 UTC (Thu) by
ldo (subscriber, #40946)
In reply to:
Re: _must_check by nix
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.
(
Log in to post comments)