On Mon, Aug 01, 2011 at 11:19:38AM +0100, Stefan Hajnoczi wrote:
> On Mon, Aug 1, 2011 at 7:49 AM, David Gibson
> <da...@gibson.dropbear.id.au> wrote:
> > When compiling with gcc 4.6, some code in fw_cfg.c complains that fop_ret
> > is assigned but not used (which is true).  However, it looks like the
> > meaningless assignments to fop_ret were done to suppress other gcc warnings
> > due to the fact that fread() is labelled as warn_unused_result in glibc.
> >
> > This patch avoids both errors, by actually checking the fread() result code
> > and dropping out with an error message if it fails.
> >
> > Signed-off-by: David Gibson <da...@gibson.dropbear.id.au>
> > ---
> >  hw/fw_cfg.c |   13 +++++++++++++
> >  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> Reviewed-by: Stefan Hajnoczi <stefa...@linux.vnet.ibm.com>

I'm not taking this into the trivial-patches tree because a build fix
like this should be merged sooner.  With trivial-patches I only send one
pull request per week and in the meantime people would have to
./configure --disable-werror which isn't good.

Stefan

Reply via email to