]> xenbits.xensource.com Git - libvirt.git/commitdiff
virDomainFormatSchedDef: Initialize @priority
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 8 Feb 2016 13:12:56 +0000 (14:12 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 9 Feb 2016 16:00:25 +0000 (17:00 +0100)
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 <mprivozn@redhat.com>
src/conf/domain_conf.c

index 895a51b587417ae1d7d390c6eeb6710914fc3529..67415fa3d590dd072820b61ec34b65c1c0ccb96d 100644 (file)
@@ -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: