From: Chris Lalancette Date: Thu, 16 Oct 2008 13:44:09 +0000 (+0000) Subject: Compiling with -Werror showed a possible use before initialization X-Git-Tag: LIBVIRT_0_5_0~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=164f78662639b321ef833e87e19fa28aea426f20;p=thirdparty%2Flibvirt.git Compiling with -Werror showed a possible use before initialization in src/qemu_driver.c. Make sure to initialize the olddisk ptr to NULL. Signed-off-by: Chris Lalancette --- diff --git a/ChangeLog b/ChangeLog index 322f837c61..1871db3dba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Oct 16 15:41:00 CEST 2008 Chris Lalancette + * Compiling with -Werror showed a possible use before initialization + in src/qemu_driver.c. Make sure to initialize the origdisk ptr to + NULL. + Thu Oct 16 15:04:36 +0200 Jim Meyering build: exempt *.ico files from the trailing blank check diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 624c8d8455..a86b787614 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -2401,6 +2401,7 @@ static int qemudDomainChangeEjectableMedia(virDomainPtr dom, return -1; } + origdisk = NULL; newdisk = dev->data.disk; for (i = 0 ; i < vm->def->ndisks ; i++) { if (vm->def->disks[i]->bus == newdisk->bus &&