On 04/26/2018 10:28 AM, Markus Armbruster wrote: > The proper way to convert from (abstract) QObject to a (concrete) > subtype is qobject_to(). Look for offenders that type cast instead: > > $ git-grep '(Q[A-Z][a-z]* \*)' > hmp.c: qmp_device_add((QDict *)qdict, NULL, &err); > include/qapi/qmp/qobject.h: return (QObject *)obj; > qobject/qobject.c:static void (*qdestroy[QTYPE__MAX])(QObject *) = { > tests/check-qdict.c: dst = (QDict *)qdict_crumple(src, &error_abort); > > The first two cast away const, the third isn't a type cast. Fix the > fourth. > > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > tests/check-qdict.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature