7a3408
From f1ae475d996a4943d25ad7a540364be6d4f6fa32 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <f1ae475d996a4943d25ad7a540364be6d4f6fa32@dist-git>
7a3408
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx@sigxcpu.org>
7a3408
Date: Thu, 9 Jul 2015 19:08:49 +0200
7a3408
Subject: [PATCH] qemu: don't use initialized ret in qemuRemoveSharedDevice
7a3408
7a3408
This fixes
7a3408
7a3408
  CC     qemu/libvirt_driver_qemu_impl_la-qemu_conf.lo
7a3408
  qemu/qemu_conf.c: In function 'qemuRemoveSharedDevice':
7a3408
  qemu/qemu_conf.c:1384:9: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
7a3408
7a3408
(cherry picked from commit c6f9ddf9099d08732acf2501b73c6817d8feb882)
7a3408
7a3408
https://bugzilla.redhat.com/show_bug.cgi?id=1072736
7a3408
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/qemu/qemu_conf.c | 2 +-
7a3408
 1 file changed, 1 insertion(+), 1 deletion(-)
7a3408
7a3408
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
7a3408
index 965d34d..030261e 100644
7a3408
--- a/src/qemu/qemu_conf.c
7a3408
+++ b/src/qemu/qemu_conf.c
7a3408
@@ -1396,7 +1396,7 @@ qemuRemoveSharedHostdev(virQEMUDriverPtr driver,
7a3408
 {
7a3408
     char *dev_path = NULL;
7a3408
     char *key = NULL;
7a3408
-    int ret;
7a3408
+    int ret = -1;
7a3408
 
7a3408
     if (!qemuIsSharedHostdev(hostdev))
7a3408
         return 0;
7a3408
-- 
7a3408
2.5.1
7a3408