Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/external/bsd/bind/dist/lib/isc/include/isc
On Wed, Sep 14, 2011 at 08:32:44AM +0100, David Laight wrote:
> On Tue, Sep 13, 2011 at 03:07:44PM -0400, Christos Zoulas wrote:
> > Module Name: src
> > Committed By: christos
> > Date: Tue Sep 13 19:07:44 UTC 2011
> >
> > Modified Files:
> > src/external/bsd/bind/dist/lib/isc/include/isc: util.h
> >
> > Log Message:
> > Some versions of linux have probably marked fwrite(3) as
> > __attribute__((__warn_unused_result__))
>
> What sort of moonshine are those guys on?
>
> Checking the result of fwrite() (and fprintf()) for error is often
> pointless since the error doesn't happen until the data is written.
While this case may be dubious, I think the __warn_unused_result__ attribute
is generally useful. It might even reveal a security bug one day. The lousy
practices of not checking return values were probably the reason for the
invention of exceptions and try {} catch {} -idioms, etc...
- Jukka.
Home |
Main Index |
Thread Index |
Old Index