This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix warnings with -D_FORTIFY_SOURCE and -Wformat-security


On Mon, 16 Mar 2009, Gerald Pfeifer wrote:

> On Sun, 15 Mar 2009, Matthias Klose wrote:
> > No, unfortunately this warning cannot be avoid by the (void) cast.
> 
> I wonder, is this something we should change or am I missing some
> subtle language standard issue?

It's the design of warn_unused_result that you're not meant to be able to 
cast away the return value.  The bug is that it's being applied to 
inappropriate functions, such as fwrite.  See bug 25509.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]