From: Michal Privoznik Date: Mon, 8 Feb 2016 13:12:56 +0000 (+0100) Subject: virDomainFormatSchedDef: Initialize @priority X-Git-Tag: v1.3.2-rc1~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=73b70b403d3550a471373a1a65b868583d4b4e1a;p=thirdparty%2Flibvirt.git virDomainFormatSchedDef: Initialize @priority Older gcc fails to see that the variable is set iff @hasPriority == true in which case the former is set a value. Initialize the value while declaring it to make the compiler shut up. Signed-off-by: Michal Privoznik --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 895a51b587..67415fa3d5 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -21472,7 +21472,7 @@ virDomainFormatSchedDef(virDomainDefPtr def, virBitmapPtr currentMap = NULL; ssize_t nextprio; bool hasPriority = false; - int priority; + int priority = 0; switch ((virProcessSchedPolicy) i) { case VIR_PROC_POLICY_NONE: