[patch] fix warnings with -D_FORTIFY_SOURCE and -Wformat-security
Joseph S. Myers
joseph@codesourcery.com
Mon Mar 16 00:06:00 GMT 2009
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
More information about the Gcc-patches
mailing list