Re: __attribute__((warn_unused_result)) for NetBSD?
David Holland <[email protected]> Sun, 28 Sep 2008 09:57:30 +0000
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Sep 28, 2008 at 12:32:06PM +0300, Aleksey Cheusov wrote: > > Meanwhile, code that uses the return value without checking it for > > error, which *is* a common mistake, is not detected > > You again make the the same mistake. You again mix up necessaty and > sufficiency. The fact that assigmnent of return value is not sufficient > for error detection doesn't prove that assignment itself is optional > and may be ommited. No, that is not a mistake. It is a question of which functions may appropriately be tagged with warn-unused-result. My point is that "functions that might fail" is not an appropriate category. > > So adding > > warn-unused-result doesn't accomplish anything in practice. > > I see. Nobody of you want to fix bmake. No, that is a completely different issue. Adding warn-unused-result to NetBSD's libc is one thing. Coping with portability problems that arise because someone has added improper warn-unused-result tags to Linux's libc is something else. -- David A. Holland [email protected]