]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/vIO-APIC: fix uninitialized variable warning
authorJan Beulich <jbeulich@suse.com>
Thu, 13 Apr 2017 15:35:02 +0000 (17:35 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 13 Apr 2017 15:35:02 +0000 (17:35 +0200)
In a release build modern gcc validly complains about "pin" possibly
being uninitialized in vioapic_irq_positive_edge().

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/x86/hvm/vioapic.c

index 52555cd32851551b114b2f3fbb5e8405a73603fe..5157db7a4e18cdb124e51b3ab5f63b7b259b3151 100644 (file)
@@ -421,7 +421,11 @@ void vioapic_irq_positive_edge(struct domain *d, unsigned int irq)
     struct hvm_vioapic *vioapic = gsi_vioapic(d, irq, &pin);
     union vioapic_redir_entry *ent;
 
-    ASSERT(vioapic);
+    if ( !vioapic )
+    {
+        ASSERT_UNREACHABLE();
+        return;
+    }
 
     HVM_DBG_LOG(DBG_LEVEL_IOAPIC, "irq %x", irq);