unicorn/qemu/qapi
Eric Blake 7e83274012
qapi-visit: Kill unused visit_end_union()
The generated code can call visit_end_union() without having called
visit_start_union(). Example:

if (!*obj) {
goto out_obj;
}
visit_type_CpuInfoBase_fields(v, (CpuInfoBase **)obj, &err);
if (err) {
goto out_obj; // if we go from here...
}
if (!visit_start_union(v, !!(*obj)->u.data, &err) || err) {
goto out_obj;
}
switch ((*obj)->arch) {
[...]
}
out_obj:
// ... then *obj is true, and ...
error_propagate(errp, err);
err = NULL;
if (*obj) {
// we end up here
visit_end_union(v, !!(*obj)->u.data, &err);
}
error_propagate(errp, err);

Harmless only because no visitor implements end_union(). Clean it up
anyway, by deleting the function as useless.

Messed up since we have visit_end_union (commit cee2ded).

Backports commit 7c91aabd8964cfdf637f302c579c95401f21ce92 from qemu
2018-02-19 22:22:24 -05:00
..
common.json qapi: Add alias for ErrorClass 2018-02-19 20:38:51 -05:00
Makefile.objs remove glib dependency by provide compatible replacements 2016-12-18 14:56:58 -08:00
qapi-dealloc-visitor.c qapi: Introduce a first class 'any' type 2018-02-19 17:46:58 -05:00
qapi-visit-core.c qapi-visit: Kill unused visit_end_union() 2018-02-19 22:22:24 -05:00
qmp-input-visitor.c qapi: Simplify visits of optional fields 2018-02-19 22:01:27 -05:00
qmp-output-visitor.c qapi: Introduce a first class 'any' type 2018-02-19 17:46:58 -05:00
string-input-visitor.c qapi: Simplify visits of optional fields 2018-02-19 22:01:27 -05:00