[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: disabling warn_unused_result attribute with FORTIFY_SOURCE?
- From: Olivier Galibert <galibert pobox com>
- To: Development discussions related to Fedora Core <fedora-devel-list redhat com>
- Subject: Re: disabling warn_unused_result attribute with FORTIFY_SOURCE?
- Date: Thu, 15 Mar 2007 12:05:49 +0100
On Thu, Mar 15, 2007 at 08:24:33AM +0100, Ralf Ertzinger wrote:
> Hi.
>
> On Thu, 15 Mar 2007 05:11:55 +0100, Miloslav Trmac wrote:
>
> > > Fix the code. All those warnings are problems.
> > How about fwrite ()? What's wrong with just using ferror () before
> > closing the file?
>
> All the write functions return the amount of bytes actually written,
> which may be different from the amount of data you gave it to write.
write yes, fwrite no. fwrite is only allowed to return a short write
on error.
OG.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]