From: Martin Quinson Date: Fri, 25 Dec 2015 21:14:25 +0000 (+0100) Subject: give a default value at field declaration, not everywhere in subclasses X-Git-Tag: v3_13~1386 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e47d2126ee520f8d88107618c42b84544e91a32c give a default value at field declaration, not everywhere in subclasses --- diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 014f9dafe5..46bec973f5 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -317,7 +317,6 @@ CpuCas01Action::CpuCas01Action(Model *model, double cost, bool failed, double sp lmm_variable_new(model->getMaxminSystem(), this, 1.0, speed, 1)) { - m_suspended = 0; if (model->getUpdateMechanism() == UM_LAZY) { m_indexHeap = -1; m_lastUpdate = surf_get_clock(); diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 6ea015287d..6f77ebf135 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -858,8 +858,6 @@ CpuTiAction::CpuTiAction(CpuTiModel *model_, double cost, bool failed, CpuTi *cpu) : CpuAction(model_, cost, failed) { - m_suspended = 0; /* Should be useless because of the - calloc but it seems to help valgrind... */ p_cpu = cpu; m_indexHeap = -1; p_cpu->modified(true); diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index 06b10dfaf8..9d6d9224d2 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -99,7 +99,7 @@ public: CpuTi *p_cpu; int m_indexHeap; - int m_suspended; + int m_suspended = 0; public: boost::intrusive::list_member_hook<> action_ti_hook; }; diff --git a/src/surf/host_ptask_L07.cpp b/src/surf/host_ptask_L07.cpp index 216dfcbb11..1f8a4879e9 100644 --- a/src/surf/host_ptask_L07.cpp +++ b/src/surf/host_ptask_L07.cpp @@ -228,7 +228,6 @@ Action *HostL07Model::executeParallelTask(int host_nb, XBT_DEBUG("Creating a parallel task (%p) with %d cpus and %d links.", action, host_nb, nb_link); - action->m_suspended = 0; /* valgrind seems to want it despite the calloc... */ action->p_computationAmount = flops_amount; action->p_communicationAmount = bytes_amount; action->m_latency = latency; diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 695653f5d7..5abc5ca995 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -699,7 +699,6 @@ void Action::initialize(simgrid::surf::Model *model, double cost, bool failed, p_variable = var; m_lastValue = 0; m_lastUpdate = 0; - m_suspended = false; m_hat = NOTSET; p_category = NULL; p_stateHookup.prev = 0; diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 0c16aaffb3..0d322d8106 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -292,7 +292,7 @@ protected: lmm_variable_t p_variable; double m_lastValue; double m_lastUpdate; - int m_suspended; + int m_suspended = 0; int m_indexHeap; enum heap_action_type m_hat; };