Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: warn_unused_result

Re: warn_unused_result

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 29 Jun 2010 23:07:49 +0200 (CEST)

On Tue, 29 Jun 2010, Frank Gevaerts wrote:

> Since a while, some build systems show lots of warnings like "warning:
> ignoring return value of 'fwrite', declared with attribute
> warn_unused_result" when building tools/. This isn't seen very often because
> the tools aren't rebuilt every time.

That's actually an issue in itself. We've previously discussed a way to make
sure they actually are rebuilt to track tool problems better, but I guess
that's a subject for a rainy day.

> It's possible to suppress the warning with -U_FORTIFY_SOURCE. Should we?

IMHO, yes. The warnings make nobody happy as they pop up now. But of course in
the long run we should check the return code of fwrite() and similar, not only
because of the warnings but also to make the tools more robust and better at
identifying where particular errors occur.

-- 
  / daniel.haxx.se
Received on 2010-06-29

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa