]> git.proxmox.com Git - mirror_qemu.git/commit
qapi: Assert output visitors see only valid enum values
authorMarkus Armbruster <armbru@redhat.com>
Fri, 24 Apr 2020 08:43:31 +0000 (10:43 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 30 Apr 2020 05:26:09 +0000 (07:26 +0200)
commit777d20cfa5735de298f378e9b90f0cd1caafdc2d
treecafdd57715a626e270530f85b7bde152d571edc6
parent8b7ce95b46815f274aed52857260cb180f6fade3
qapi: Assert output visitors see only valid enum values

output_type_enum() fails when *obj is not a valid value of the enum
type.  Should not happen.  Drop the check, along with its unit tests.
This unmasks qapi_enum_lookup()'s assertion.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200424084338.26803-9-armbru@redhat.com>
[Commit message tweaked]
qapi/qapi-visit-core.c
tests/test-qobject-output-visitor.c
tests/test-string-output-visitor.c