libvirt/src/storage
Michal Privoznik bde6e002b5 Initialize couple of variables.
While trying to build with -Os couple of compile errors showed
up.

conf/domain_conf.c: In function 'virDomainChrRemove':
conf/domain_conf.c:13666:24: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     virDomainChrDefPtr ret, **arrPtr = NULL;
                        ^
Compiler fails to see that @ret is used only if set in the loop,
but whatever, there's no harm in initializing the variable.

In vboxAttachDrivesNew and _vboxAttachDrivesOld compiler thinks
that @rc may be used uninitialized. Well, not directly, but maybe
after some optimization. Yet again, no harm in initializing a
variable.

In file included from ./util/virthread.h:26:0,
                 from ./datatypes.h:28,
                 from vbox/vbox_tmpl.c:43,
                 from vbox/vbox_V3_1.c:37:
vbox/vbox_tmpl.c: In function '_vboxAttachDrivesOld':
./util/virerror.h:181:5: error: 'rc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     virReportErrorHelper(VIR_FROM_THIS, code, __FILE__,              \
     ^
In file included from vbox/vbox_V3_1.c:37:0:
vbox/vbox_tmpl.c:1041:14: note: 'rc' was declared here
     nsresult rc;
              ^
Yet again, one uninitialized variable:

qemu/qemu_driver.c: In function 'qemuDomainBlockCommit':
qemu/qemu_driver.c:17194:9: error: 'baseSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         qemuDomainPrepareDiskChainElement(driver, vm, baseSource,
         ^

And another one:

storage/storage_backend_logical.c: In function 'virStorageBackendLogicalMatchPoolSource.isra.2':
storage/storage_backend_logical.c:618:33: error: 'thisSource' may be used uninitialized in this function [-Werror=maybe-uninitialized]
                       thisSource->devices[j].path))
                                 ^

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-03-03 14:39:57 +01:00
..
parthelper.c storage: Add new flag for libvirt_parthelper 2016-01-19 13:02:59 -05:00
storage_backend_disk.c storage: Add new flag for libvirt_parthelper 2016-01-19 13:02:59 -05:00
storage_backend_disk.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_fs.c storage: Check FS pool source during virStorageBackendFileSystemIsMounted 2015-12-15 14:33:04 -05:00
storage_backend_fs.h storage: add file functions for local and block files 2014-02-14 10:47:57 +01:00
storage_backend_gluster.c Revert "Restore skipping of setting capacity" 2015-03-02 08:07:11 +01:00
storage_backend_gluster.h storage: Add storage file backends for gluster 2014-02-14 11:07:23 +01:00
storage_backend_iscsi.c iscsi: do not fail to stop a stopped pool 2015-04-30 13:05:10 +02:00
storage_backend_iscsi.h Move functions using iscsiadm to viriscsi.c 2014-03-20 18:04:50 +01:00
storage_backend_logical.c Initialize couple of variables. 2016-03-03 14:39:57 +01:00
storage_backend_logical.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_mpath.c storage: Add readflags for backend error processing 2015-12-09 16:31:14 -05:00
storage_backend_mpath.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
storage_backend_rbd.c rbd: fix 32-bit build 2016-02-23 16:54:35 -07:00
storage_backend_rbd.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
storage_backend_scsi.c storage: Ignore block devices that fail format detection 2015-12-09 16:31:15 -05:00
storage_backend_scsi.h storage: Move virStorageBackendSCSIGetHostNumber into iscsi backend 2013-04-08 18:41:06 +08:00
storage_backend_sheepdog.c virStringListLength: Ensure const correctness 2016-02-09 15:44:58 -05:00
storage_backend_sheepdog.h Change file names in comments to match the files they are in 2014-03-10 14:26:04 +01:00
storage_backend_zfs.c storage: No need to check ret after VIR_APPEND_ELEMENT 2016-02-25 11:52:49 -05:00
storage_backend_zfs.h storage: ZFS support 2014-08-12 19:40:20 +04:00
storage_backend.c Clean up usage of 'ret' variable 2016-02-11 08:05:16 +01:00
storage_backend.h storage: Handle readflags errors 2015-12-09 16:31:14 -05:00
storage_driver.c storage: Fix error path in storagePoolDefineXML 2016-02-26 07:23:05 -05:00
storage_driver.h storage: Introduce virStoragePoolObjFindPoolByUUID 2015-11-12 06:30:32 -05:00