From: Peter Krempa Date: Mon, 28 Jul 2014 09:38:35 +0000 (+0200) Subject: qemu: sound: Fix uninitialized model string X-Git-Tag: v1.2.7-rc2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a813d1c61b411a0914fdd2b18ec9cc92bd7137a9;p=thirdparty%2Flibvirt.git qemu: sound: Fix uninitialized model string Commit e5f36698e3efc3d258b2996c7423c47e05ec52b2 introduces a false-positive build failure in the sound card model handling switch. Initialize the model to NULL although the value should never be used. --- diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index cb3c584786..beb8ca80da 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -4674,7 +4674,7 @@ qemuBuildSoundDevStr(virDomainDefPtr def, virQEMUCapsPtr qemuCaps) { virBuffer buf = VIR_BUFFER_INITIALIZER; - const char *model; + const char *model = NULL; /* Hack for devices with different names in QEMU and libvirt */ switch ((virDomainSoundModel) sound->model) {