aboutsummaryrefslogtreecommitdiff
path: root/test-qmp-commands.c
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2011-08-01 16:49:59 +1000
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-05 10:57:34 -0500
commit257a7375582e4c3b32687c72d0f52279d28b2d85 (patch)
treebe0ea143ef397130589e1ce17ccf2044e9c6d0a3 /test-qmp-commands.c
parent8a6b0cd7642f6a69700ef5c082b750140d61b7f4 (diff)
Check fread() results to avoid gcc 4.6 warnings
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. Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'test-qmp-commands.c')
0 files changed, 0 insertions, 0 deletions