From ba1f54804a6a0a5780bb198a41a062b5f4512d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 19 Dec 2018 10:53:17 -0500 Subject: [PATCH] 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 --- qemu/scripts/qapi/common.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu/scripts/qapi/common.py b/qemu/scripts/qapi/common.py index ec6516ea..4460c24d 100644 --- a/qemu/scripts/qapi/common.py +++ b/qemu/scripts/qapi/common.py @@ -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: