diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 8bfe895d5c..39cedbd46e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -13663,7 +13663,7 @@ virDomainChrDefPtr virDomainChrRemove(virDomainDefPtr vmdef, virDomainChrDefPtr chr) { - virDomainChrDefPtr ret, **arrPtr = NULL; + virDomainChrDefPtr ret = NULL, **arrPtr = NULL; size_t i, *cntPtr = NULL; virDomainChrGetDomainPtrsInternal(vmdef, chr->deviceType, &arrPtr, &cntPtr); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9fd4c570cd..102fade280 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16988,7 +16988,7 @@ qemuDomainBlockCommit(virDomainPtr dom, virDomainDiskDefPtr disk = NULL; virStorageSourcePtr topSource; unsigned int topIndex = 0; - virStorageSourcePtr baseSource; + virStorageSourcePtr baseSource = NULL; unsigned int baseIndex = 0; virStorageSourcePtr top_parent = NULL; bool clean_access = false; diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index 167fe58d7e..ecbf430544 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -575,7 +575,7 @@ static bool virStorageBackendLogicalMatchPoolSource(virStoragePoolObjPtr pool) { virStoragePoolSourceList sourceList; - virStoragePoolSource *thisSource; + virStoragePoolSource *thisSource = NULL; size_t i, j; int matchcount = 0; bool ret = false; diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index 8c00a4f5b7..0152b353b0 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -987,7 +987,7 @@ vboxAttachDrivesNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine { /* AttachDrives for 3.0 and later */ size_t i; - nsresult rc; + nsresult rc = 0; PRUint32 maxPortPerInst[StorageBus_Floppy + 1] = {}; PRUint32 maxSlotPerPort[StorageBus_Floppy + 1] = {}; PRUnichar *storageCtlName = NULL; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index cc86bf787e..0fbd5b3297 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -1038,7 +1038,7 @@ static void _vboxAttachDrivesOld(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) { size_t i; - nsresult rc; + nsresult rc = 0; PRUint32 maxPortPerInst[StorageBus_Floppy + 1] = {}; PRUint32 maxSlotPerPort[StorageBus_Floppy + 1] = {};