tech-misc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: __attribute__((warn_unused_result)) for NetBSD?
>> Why? IMO Not checking for return value of all these functions as
>> well as close fclose etc. is VERY dangerous.
> Please, explain to me what exactly you intend to do to handle an
> error return from close().
I didn't write that. But the answer seems pretty obvious: report it to
wherever is appropriate for errors on the file in question.
Typically an error from close() will be something like a delayed-write
I/O error, something the file writer quite likely wants to hear about.
Of course, there also are plenty of uses of close for which the return
value is of no interest whatsoever, such as closing a readonly input
file.
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index