From 29e17f65a8ad1c80b093be6e3ef9f79b557893bc Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Wed, 16 Nov 2016 08:55:30 +0100 Subject: [PATCH] Avoid compiler warnings in virCPUDefStealModel 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 --- 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 9eb69c9c85..1bcceeda42 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); -- GitLab