From: Daniel P. Berrangé Date: Tue, 17 Sep 2019 11:24:25 +0000 (+0100) Subject: remote: don't pull anonymous enums into rpc protocol structs X-Git-Tag: v5.8.0-rc2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=509a1d9da44461ecf3405c545ce7c7df2da25693;p=thirdparty%2Flibvirt.git remote: don't pull anonymous enums into rpc protocol structs 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é --- 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;