[libvirt PATCH] conf: split out virDomainFeaturesDefParse

Peter Krempa pkrempa at redhat.com
Wed Apr 22 06:39:06 UTC 2020


On Tue, Apr 21, 2020 at 19:00:31 +0200, Ján Tomko wrote:
> The virDomainDefParseXML function has grown so large it broke the build:
> ../../src/conf/domain_conf.c:20362:1: error: stack frame size of 4168 bytes
> in function 'virDomainDefParseXML' [-Werror,-Wframe-larger-than=]
> 
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
> Technically a build breaker fix. I'm sure I will regret not having it
> pushed as such tomorrow.
> 
> Formatted with patience.
> 
>  src/conf/domain_conf.c | 965 +++++++++++++++++++++--------------------
>  1 file changed, 492 insertions(+), 473 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 9f3362c934..d9c4b487a8 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -19181,6 +19181,496 @@ virDomainResourceDefParse(xmlNodePtr node,
>      return NULL;
>  }
>  
> +
> +static int virDomainFeaturesDefParse(virDomainDefPtr def,
> +                                     xmlXPathContextPtr ctxt)

Please format the header as we do normally.

> +{
> +    g_autofree xmlNodePtr *nodes = NULL;
> +    g_autofree char *tmp = NULL;
> +    xmlNodePtr node = NULL;
> +    int n, gic_version;

One definition per line.


Reviewed-by: Peter Krempa <pkrempa at redhat.com>




More information about the libvir-list mailing list