提交 5fdb3aa1 编写于 作者: K Kirill A. Shutemov 提交者: Blue Swirl

savevm.c: fix warning with _FORTIFY_SOURCE

  CC    savevm.o
cc1: warnings being treated as errors
savevm.c: In function 'file_put_buffer':
savevm.c:342: error: ignoring return value of 'fwrite', declared with attribute warn_unused_result
make: *** [savevm.o] Error 1
Signed-off-by: NKirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 f0d98b05
......@@ -339,8 +339,7 @@ static int file_put_buffer(void *opaque, const uint8_t *buf,
{
QEMUFileStdio *s = opaque;
fseek(s->stdio_file, pos, SEEK_SET);
fwrite(buf, 1, size, s->stdio_file);
return size;
return fwrite(buf, 1, size, s->stdio_file);
}
static int file_get_buffer(void *opaque, uint8_t *buf, int64_t pos, int size)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册