提交 0ed6dc1a 编写于 作者: A Amos Kong 提交者: Stefan Hajnoczi

error.c: don't return value for void function

It is invalid to return a value from a function
returning void.

[C99 6.8.6.4 says "A return statement with an expression shall not
appear in a function whose return type is void" but gcc 4.6.3 with QEMU
compile flags does not complain.  It's still worth fixing this.  Stefan]
Signed-off-by: NAmos Kong <akong@redhat.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
上级 51006bbc
......@@ -93,7 +93,7 @@ QDict *error_get_data(Error *err)
void error_set_field(Error *err, const char *field, const char *value)
{
QDict *dict = qdict_get_qdict(err->obj, "data");
return qdict_put(dict, field, qstring_from_str(value));
qdict_put(dict, field, qstring_from_str(value));
}
void error_free(Error *err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册