Old GCC on CentOS 6 thinks vendor and vendor_id might be used
uninitialized in virCPUDefStealModel. The compiler is wrong, though.

Signed-off-by: Jiri Denemark <[email protected]>
---

Pushed as a build breaker.

 src/conf/cpu_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 9eb69c9..1bcceed 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -144,8 +144,8 @@ virCPUDefStealModel(virCPUDefPtr dst,
                     virCPUDefPtr src,
                     bool keepVendor)
 {
-    char *vendor;
-    char *vendor_id;
+    char *vendor = NULL;
+    char *vendor_id = NULL;
 
     if (keepVendor) {
         VIR_STEAL_PTR(vendor, dst->vendor);
-- 
2.10.2

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to