From 509a1d9da44461ecf3405c545ce7c7df2da25693 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Tue, 17 Sep 2019 12:24:25 +0100 Subject: [PATCH] remote: don't pull anonymous enums into rpc protocol structs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The VIR_TYPED_PARAM_* enum fields are defined in libvirt-common.h, not in the remote protcol, so shouldn't be part of the protocol structs output check. This avoids similar problems hitting when we add use of glib, which has other such anonymous enums. Reviewed-by: Pavel Hrdina Signed-off-by: Daniel P. Berrangé --- src/Makefile.am | 3 +-- src/admin_protocol-structs | 9 --------- src/remote_protocol-structs | 9 --------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index cd955ee552..bd03b09cb2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -240,8 +240,7 @@ PDWTAGS = \ else \ $(PERL) -0777 -n \ -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \ - -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \ - -e ' $$p =~ /^enum \{/) {' \ + -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/) {' \ -e ' $$p =~ s!\t*/\*.*?\*/!!sg;' \ -e ' $$p =~ s!\s+\n!\n!sg;' \ -e ' $$p =~ s!\s+$$!!;' \ diff --git a/src/admin_protocol-structs b/src/admin_protocol-structs index a6c53807ee..983e6e5292 100644 --- a/src/admin_protocol-structs +++ b/src/admin_protocol-structs @@ -1,13 +1,4 @@ /* -*- c -*- */ -enum { - VIR_TYPED_PARAM_INT = 1, - VIR_TYPED_PARAM_UINT = 2, - VIR_TYPED_PARAM_LLONG = 3, - VIR_TYPED_PARAM_ULLONG = 4, - VIR_TYPED_PARAM_DOUBLE = 5, - VIR_TYPED_PARAM_BOOLEAN = 6, - VIR_TYPED_PARAM_STRING = 7, -}; struct admin_typed_param_value { int type; union { diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index eb689b3574..51606e7473 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -1,13 +1,4 @@ /* -*- c -*- */ -enum { - VIR_TYPED_PARAM_INT = 1, - VIR_TYPED_PARAM_UINT = 2, - VIR_TYPED_PARAM_LLONG = 3, - VIR_TYPED_PARAM_ULLONG = 4, - VIR_TYPED_PARAM_DOUBLE = 5, - VIR_TYPED_PARAM_BOOLEAN = 6, - VIR_TYPED_PARAM_STRING = 7, -}; struct remote_nonnull_domain { remote_nonnull_string name; remote_uuid uuid;