Re: Compile warnings
On Mon, 14 Nov 2011 17:58:20 +0100, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 11 quoted lines
> On Mon, Nov 14, 2011 at 15:55, Frans Klaver <fransklaver@gmail.com>
> wrote:
>> Every now and then I see an 'unused result' warning come by during
>> building.
>> What is the general attitude towards these warnings? Remove them (by
>> properly checking)? Or leave them be as a kind of documentation -- we
>> know
>> we're ignoring the info, but it's good to be reminded?
>
> Under what OS / version and compiler / version and what's the warning?
> Paste the full warning(s) you get verbatim.
This question was triggered by
warning: ignoring return value of ‘fwrite’, declared with attribute
warn_unused_result
appearing in diff.c, graph.c, grep.c and several others. I'm using gentoo linux, gcc 4.5.3.
So the specific question would be, do these fwrites need to be checked?