tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: __attribute__((warn_unused_result)) for NetBSD?



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
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index