libvirt/src/conf
Eric Blake 83b1808ca2 snapshot: Improve logic of virDomainMomentMoveChildren
Even though Coverity can prove that 'last' is always set if the prior
loop executed, gcc 8.0.1 cannot:

  CC       conf/libvirt_conf_la-virdomainmomentobjlist.lo
../../src/conf/virdomainmomentobjlist.c: In function 'virDomainMomentMoveChildren':
../../src/conf/virdomainmomentobjlist.c:178:19: error: 'last' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         last->sibling = to->first_child;
         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~

Rewrite the loop to a form that should be easier for static analysis
to work with.

Fixes: ced0898f86
Reported-by: Bjoern Walk <bwalk@linux.ibm.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-03-28 10:38:11 -05:00
..
capabilities.c conf: Introduce storage pool functions into capabilities 2019-03-06 11:12:48 -05:00
capabilities.h conf: Split capabilities forward typedefs into virconftypes.h 2019-03-15 11:31:12 -05:00
cpu_conf.c Require a semicolon for VIR_ENUM_IMPL calls 2019-02-03 17:46:29 -05:00
cpu_conf.h Require a semicolon to VIR_ENUM_DECL calls 2019-02-03 17:46:29 -05:00
device_conf.c conf: make virPCIDeviceAddressFormat void 2019-02-19 15:59:38 +00:00
device_conf.h conf: make virPCIDeviceAddressFormat void 2019-02-19 15:59:38 +00:00
domain_addr.c lib: Use more of VIR_STEAL_PTR() 2019-01-28 14:46:58 +01:00
domain_addr.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
domain_audit.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
domain_audit.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
domain_capabilities.c conf: domcaps: Don't format XML on report=false 2019-03-18 10:51:02 -04:00
domain_capabilities.h conf: domcaps: Add virCapsEnum 'report' 2019-03-18 10:51:02 -04:00
domain_conf.c domain_conf: check device address before attach 2019-03-25 10:23:59 +01:00
domain_conf.h snapshot: Track current snapshot in virDomainSnapshotObjList 2019-03-22 01:15:20 -05:00
domain_event.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
domain_event.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
domain_nwfilter.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
domain_nwfilter.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
interface_conf.c Require a semicolon for VIR_ENUM_IMPL calls 2019-02-03 17:46:29 -05:00
interface_conf.h Require a semicolon to VIR_ENUM_DECL calls 2019-02-03 17:46:29 -05:00
Makefile.inc.am snapshot: Rename file for virDomainMomentObj 2019-03-22 01:18:34 -05:00
moment_conf.c snapshot: Factor out virDomainMomentDef class 2019-03-22 01:18:34 -05:00
moment_conf.h snapshot: Factor out virDomainMomentDef class 2019-03-22 01:18:34 -05:00
netdev_bandwidth_conf.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
netdev_bandwidth_conf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
netdev_vlan_conf.c Require a semicolon for VIR_ENUM_IMPL calls 2019-02-03 17:46:29 -05:00
netdev_vlan_conf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
netdev_vport_profile_conf.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
netdev_vport_profile_conf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
network_conf.c conf: make virPCIDeviceAddressFormat void 2019-02-19 15:59:38 +00:00
network_conf.h Require a semicolon to VIR_ENUM_DECL calls 2019-02-03 17:46:29 -05:00
network_event.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
network_event.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
networkcommon_conf.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
networkcommon_conf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
node_device_conf.c xml: nodedev: make pci capability class element optional 2019-03-22 12:59:56 +03:00
node_device_conf.h xml: nodedev: make pci capability class element optional 2019-03-22 12:59:56 +03:00
node_device_event.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
node_device_event.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
node_device_util.c conf: Add new module node_device_util 2018-11-12 16:23:35 +01:00
node_device_util.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
numa_conf.c Require a semicolon for VIR_ENUM_IMPL calls 2019-02-03 17:46:29 -05:00
numa_conf.h Require a semicolon to VIR_ENUM_DECL calls 2019-02-03 17:46:29 -05:00
nwfilter_conf.c Drop some useless comparisons and checks 2019-03-07 09:22:47 +01:00
nwfilter_conf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
nwfilter_ipaddrmap.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
nwfilter_ipaddrmap.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
nwfilter_params.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
nwfilter_params.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
object_event_private.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
object_event.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
object_event.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
secret_conf.c util: Introduce virStringParseYesNo helper 2019-03-13 14:24:18 +01:00
secret_conf.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
secret_event.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
secret_event.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
snapshot_conf.c Revert "snapshot: Allow NULL to virDomainSnapshotObjGetDef" 2019-03-27 09:21:45 -05:00
snapshot_conf.h Revert "snapshot: Add virDomainSnapshotObjListFormat" 2019-03-26 15:07:47 -05:00
storage_adapter_conf.c conf: make virPCIDeviceAddressFormat void 2019-02-19 15:59:38 +00:00
storage_adapter_conf.h Require a semicolon to VIR_ENUM_DECL calls 2019-02-03 17:46:29 -05:00
storage_capabilities.c conf: Add storage pool capability formatting 2019-03-06 11:12:48 -05:00
storage_capabilities.h conf: Add storage pool capability formatting 2019-03-06 11:12:48 -05:00
storage_conf.c virStoragePoolDefParseSource: Don't leak @port 2019-03-19 17:36:27 +01:00
storage_conf.h storage: optional 'refresh' elemement on pool 2019-03-19 16:46:21 +01:00
storage_event.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
storage_event.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virchrdev.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
virchrdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virconftypes.h snapshot: Create new virDomainMomentObjList type 2019-03-22 01:18:34 -05:00
virdomainmomentobjlist.c snapshot: Improve logic of virDomainMomentMoveChildren 2019-03-28 10:38:11 -05:00
virdomainmomentobjlist.h snapshot: Drop pointless function virDomainMomentIsCurrentName 2019-03-27 08:13:24 -05:00
virdomainobjlist.c snapshot: Break out virDomainSnapshotObjList into its own file 2019-03-15 11:43:09 -05:00
virdomainobjlist.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virdomainsnapshotobjlist.c snapshot: Drop pointless function virDomainMomentIsCurrentName 2019-03-27 08:13:24 -05:00
virdomainsnapshotobjlist.h Revert "snapshot: Allow NULL to virDomainSnapshotObjGetDef" 2019-03-27 09:21:45 -05:00
virinterfaceobj.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
virinterfaceobj.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnetworkobj.c util: Rename virFileStripSuffix() to virStringStripSuffix() 2019-03-07 10:10:43 +01:00
virnetworkobj.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnodedeviceobj.c Require a semicolon for VIR_ONCE_GLOBAL_INIT calls 2019-02-03 17:46:29 -05:00
virnodedeviceobj.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnwfilterbindingdef.c conf: add support for parsing/formatting virNWFilterBindingDefPtr 2018-06-26 11:22:07 +01:00
virnwfilterbindingdef.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnwfilterbindingobj.c virnwfilterbindingobj: Introduce and use virNWFilterBindingObjStealDef 2019-03-20 16:26:31 +01:00
virnwfilterbindingobj.h virnwfilterbindingobj: Introduce and use virNWFilterBindingObjStealDef 2019-03-20 16:26:31 +01:00
virnwfilterbindingobjlist.c virnwfilterbindingobj: Introduce and use virNWFilterBindingObjStealDef 2019-03-20 16:26:31 +01:00
virnwfilterbindingobjlist.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virnwfilterobj.c util: Rename virFileStripSuffix() to virStringStripSuffix() 2019-03-07 10:10:43 +01:00
virnwfilterobj.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsavecookie.c
virsavecookie.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virsecretobj.c Use virStringHasSuffix() where possible 2019-03-07 10:10:49 +01:00
virsecretobj.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
virstorageobj.c Use virStringHasSuffix() where possible 2019-03-07 10:10:49 +01:00
virstorageobj.h storage: Process storage pool capabilities 2019-03-06 11:12:48 -05:00