qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 13/47] coverity/s390x: avoid false positive in kvm_ir


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 13/47] coverity/s390x: avoid false positive in kvm_irqchip_add_adapter_route
Date: Mon, 15 Dec 2014 17:37:57 +0100

From: Christian Borntraeger <address@hidden>

Paolo Bonzini reported that Coverity reports an uninitialized pad value.
Let's use a designated initializer for kvm_irq_routing_entry to avoid
this false positive. This is similar to kvm_irqchip_add_msi_route and
other users of kvm_irq_routing_entry.

Signed-off-by: Christian Borntraeger <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 kvm-all.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kvm-all.c b/kvm-all.c
index 4bfeccc..18cc6b4 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1277,7 +1277,7 @@ static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, 
int rfd, int virq,
 
 int kvm_irqchip_add_adapter_route(KVMState *s, AdapterInfo *adapter)
 {
-    struct kvm_irq_routing_entry kroute;
+    struct kvm_irq_routing_entry kroute = {};
     int virq;
 
     if (!kvm_gsi_routing_enabled()) {
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]