* [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals
@ 2018-12-17 20:40 Marc-André Lureau
2018-12-18 7:19 ` Markus Armbruster
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Marc-André Lureau @ 2018-12-17 20:40 UTC (permalink / raw)
To: qemu-devel; +Cc: armbru, thuth, Marc-André Lureau, Michael Roth
Default branches variant should use the member conditional.
This fixes compilation with --disable-replication.
Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
scripts/qapi/common.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index 8c2d97369e..d385a08270 100644
--- a/scripts/qapi/common.py
+++ b/scripts/qapi/common.py
@@ -1460,7 +1460,7 @@ 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:
--
2.20.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals
2018-12-17 20:40 [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals Marc-André Lureau
@ 2018-12-18 7:19 ` Markus Armbruster
2018-12-18 10:09 ` Markus Armbruster
2018-12-18 10:21 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2018-12-18 7:19 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel, thuth, Michael Roth
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Default branches variant should use the member conditional.
>
> This fixes compilation with --disable-replication.
>
> Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> scripts/qapi/common.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
> index 8c2d97369e..d385a08270 100644
> --- a/scripts/qapi/common.py
> +++ b/scripts/qapi/common.py
> @@ -1460,7 +1460,7 @@ 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:
Long line, happy to wrap it when I apply.
I append the diff of generated code.
Reviewed-by: Markus Armbruster <armbru@redhat.com>
diff -rup qapi-gen-fb06411210/qapi-introspect.c qapi-gen-ce1a1aec47/qapi-introspect.c
--- qapi-gen-fb06411210/qapi-introspect.c 2018-12-18 08:15:43.929724950 +0100
+++ qapi-gen-ce1a1aec47/qapi-introspect.c 2018-12-18 08:11:30.927263620 +0100
@@ -10068,11 +10068,13 @@ const QLitObject qmp_schema_qlit = QLIT_
{ "type", QLIT_QSTR("0"), },
{}
})),
+#if defined(CONFIG_REPLICATION)
QLIT_QDICT(((QLitDictEntry[]) {
{ "case", QLIT_QSTR("replication"), },
{ "type", QLIT_QSTR("0"), },
{}
})),
+#endif /* defined(CONFIG_REPLICATION) */
QLIT_QDICT(((QLitDictEntry[]) {
{ "case", QLIT_QSTR("throttle"), },
{ "type", QLIT_QSTR("0"), },
diff -rup qapi-gen-fb06411210/qapi-visit-block-core.c qapi-gen-ce1a1aec47/qapi-visit-block-core.c
--- qapi-gen-fb06411210/qapi-visit-block-core.c 2018-12-18 08:15:43.833726292 +0100
+++ qapi-gen-ce1a1aec47/qapi-visit-block-core.c 2018-12-18 08:11:30.833264935 +0100
@@ -7175,8 +7175,10 @@ void visit_type_BlockdevCreateOptions_me
break;
case BLOCKDEV_DRIVER_RAW:
break;
+#if defined(CONFIG_REPLICATION)
case BLOCKDEV_DRIVER_REPLICATION:
break;
+#endif /* defined(CONFIG_REPLICATION) */
case BLOCKDEV_DRIVER_THROTTLE:
break;
case BLOCKDEV_DRIVER_VMDK:
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals
2018-12-17 20:40 [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals Marc-André Lureau
2018-12-18 7:19 ` Markus Armbruster
@ 2018-12-18 10:09 ` Markus Armbruster
2018-12-18 10:21 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Markus Armbruster @ 2018-12-18 10:09 UTC (permalink / raw)
To: Marc-André Lureau; +Cc: qemu-devel, thuth, Michael Roth
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Default branches variant should use the member conditional.
>
> This fixes compilation with --disable-replication.
>
> Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Queued, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals
2018-12-17 20:40 [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals Marc-André Lureau
2018-12-18 7:19 ` Markus Armbruster
2018-12-18 10:09 ` Markus Armbruster
@ 2018-12-18 10:21 ` Thomas Huth
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2018-12-18 10:21 UTC (permalink / raw)
To: Marc-André Lureau, qemu-devel; +Cc: armbru, Michael Roth
On 2018-12-17 21:40, Marc-André Lureau wrote:
> Default branches variant should use the member conditional.
>
> This fixes compilation with --disable-replication.
>
> Fixes: 335d10cd8e2c3bb6067804b095aaf6371fc1983e
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> scripts/qapi/common.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
> index 8c2d97369e..d385a08270 100644
> --- a/scripts/qapi/common.py
> +++ b/scripts/qapi/common.py
> @@ -1460,7 +1460,7 @@ 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:
This fixes the compilation problem for me, indeed!
Tested-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-12-18 10:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-17 20:40 [Qemu-devel] [PATCH] qapi: fix flat union on uncovered branches conditionals Marc-André Lureau
2018-12-18 7:19 ` Markus Armbruster
2018-12-18 10:09 ` Markus Armbruster
2018-12-18 10:21 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).