mirror of
https://github.com/OpenNebula/one.git
synced 2024-12-23 17:33:56 +03:00
M #-: Fix CppCheck issues in 6.6 branch (#2485)
(cherry picked from commit c70a239033
)
This commit is contained in:
parent
ef5d0c60d4
commit
19f18e2877
@ -135,7 +135,7 @@ public:
|
||||
typedef class IncIterator inc_iterator;
|
||||
|
||||
private:
|
||||
ExtendedAttribute * attribute_factory(VectorAttribute * va, int id) const
|
||||
ExtendedAttribute * attribute_factory(VectorAttribute * va, int id) const override
|
||||
{
|
||||
return new Increment(va, id);
|
||||
};
|
||||
|
@ -2039,7 +2039,7 @@ void LifeCycleManager::trigger_updatevnet(int vnid)
|
||||
// -------------------------------------------------------------
|
||||
if ( is_tmpl || is_update )
|
||||
{
|
||||
auto rc = vm->nic_update(vnid);
|
||||
rc = vm->nic_update(vnid);
|
||||
|
||||
if (rc < 0)
|
||||
{
|
||||
|
@ -3974,8 +3974,6 @@ void VirtualMachineBackup::request_execute(
|
||||
Backups::Mode mode;
|
||||
int li_id;
|
||||
|
||||
ostringstream oss;
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// Get request parameters
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -59,9 +59,9 @@ private:
|
||||
VMBackupAction():backup("SCHED_ACTION"){};
|
||||
|
||||
/** ID of the VM and action**/
|
||||
int vm_id;
|
||||
int vm_id = -1;
|
||||
|
||||
int action_id;
|
||||
int action_id = -1;
|
||||
|
||||
/** Pending backup operation **/
|
||||
VectorAttribute backup;
|
||||
|
@ -80,7 +80,9 @@ protected:
|
||||
host_dispatch_limit(0),
|
||||
zone_id(0),
|
||||
mem_ds_scale(0),
|
||||
diff_vnets(false)
|
||||
diff_vnets(false),
|
||||
max_backups(5),
|
||||
max_backups_host(2)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -163,12 +163,12 @@ public:
|
||||
*/
|
||||
int set_up() override;
|
||||
|
||||
int active_backups()
|
||||
int active_backups() const
|
||||
{
|
||||
return _active_backups;
|
||||
}
|
||||
|
||||
int host_backups(int host_id)
|
||||
int host_backups(int host_id) const
|
||||
{
|
||||
return backups_host[host_id];
|
||||
}
|
||||
@ -183,7 +183,7 @@ protected:
|
||||
/**
|
||||
* Total backup operations in progress
|
||||
*/
|
||||
mutable int _active_backups;
|
||||
mutable int _active_backups = 0;
|
||||
|
||||
/**
|
||||
* Backup operations per host
|
||||
|
@ -332,7 +332,7 @@ int VirtualMachineActionsPoolXML::get_suitable_nodes(
|
||||
<< " and (not(DONE > 0) or boolean(REPEAT))) or "
|
||||
<< "( TIME[starts-with(text(),\"+\")] and not(DONE>0) ) ]/../..";
|
||||
|
||||
return get_nodes(oss.str().c_str(), content);
|
||||
return get_nodes(oss.str(), content);
|
||||
}
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
@ -2374,8 +2374,6 @@ int VirtualMachineManager::updatenic(VirtualMachine * vm, int vnid)
|
||||
string vm_tmpl;
|
||||
string drv_msg;
|
||||
|
||||
ostringstream os;
|
||||
|
||||
if (!vm->hasHistory())
|
||||
{
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user