Re: [Qemu-devel] [PATCH] Check fread() results to avoid gcc 4.6 warnings

2011-08-05 Thread Anthony Liguori
On 08/01/2011 01:49 AM, David Gibson 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 l

[Qemu-devel] [PATCH] Check fread() results to avoid gcc 4.6 warnings

2011-07-31 Thread David Gibson
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