qapi: fix flat union on uncovered branches conditionals

Default branches variant should use the member conditional.

This fixes compilation with --disable-replication.

Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e

Backports commit ce1a1aec47877a281d69dbc2e65f86bfe8fea231 from qemu
This commit is contained in:
Marc-André Lureau 2018-12-19 10:53:17 -05:00 committed by Lioncash
parent f8435ca3a6
commit ba1f54804a
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1417,7 +1417,8 @@ class QAPISchemaObjectTypeVariants(object):
cases = set([v.name for v in self.variants])
for m in self.tag_member.type.members:
if m.name not in cases:
v = QAPISchemaObjectTypeVariant(m.name, 'q_empty')
v = QAPISchemaObjectTypeVariant(m.name, 'q_empty',
m.ifcond)
v.set_owner(self.tag_member.owner)
self.variants.append(v)
for v in self.variants: