From: Jiri Denemark Date: Wed, 16 Nov 2016 07:55:30 +0000 (+0100) Subject: Avoid compiler warnings in virCPUDefStealModel X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=29e17f65a8ad1c80b093be6e3ef9f79b557893bc;p=libvirt.git 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 --- 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);