summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorAmos Kong <akong@redhat.com>2012-04-16 15:32:49 +0800
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2012-04-20 13:14:53 +0100
commit0ed6dc1a982fd029557a17fda7606d679a6ebb28 (patch)
tree86085f5f5086c965bca6f86fb0a61ef9fb74985e /error.c
parent51006bbc45bc74977ae538190a53df2af534acb9 (diff)
downloadqemu-0ed6dc1a982fd029557a17fda7606d679a6ebb28.tar.gz
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: Amos Kong <akong@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index d3455ab9e6..a52b7710d2 100644
--- a/error.c
+++ b/error.c
@@ -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)