Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Initialize variables.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Nov 2013 21:29:53 +0000 (22:29 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Wed, 20 Nov 2013 21:29:53 +0000 (22:29 +0100)
src/surf/cpu_cas01.cpp
src/surf/cpu_ti.cpp
src/surf/network.cpp
src/surf/surf.cpp

index 0ad4498..2cca94a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2009-2011. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -63,8 +63,8 @@ void surf_cpu_model_init_Cas01()
 
 CpuCas01Model::CpuCas01Model() : CpuModel("cpu")
 {
-  ActionPtr action;
-  ActionLmmPtr actionlmm;
+  ActionPtr action = NULL;
+  ActionLmmPtr actionlmm = NULL;
 
   char *optim = xbt_cfg_get_string(_sg_cfg_set, "cpu/optim");
   int select = xbt_cfg_get_boolean(_sg_cfg_set, "cpu/maxmin_selective_update");
index 56329d5..46f390e 100644 (file)
@@ -409,7 +409,7 @@ void surf_cpu_model_init_ti()
 CpuTiModel::CpuTiModel() : CpuModel("cpu_ti")
 {
   xbt_assert(!surf_cpu_model_pm,"CPU model already initialized. This should not happen.");
-  ActionPtr action;
+  ActionPtr action = NULL;
   CpuTi cpu;
 
   cpu_ti_running_action_set_that_does_not_need_being_checked =
@@ -595,7 +595,7 @@ CpuTi::CpuTi(CpuTiModelPtr model, const char *name, xbt_dynar_t powerPeak,
   XBT_DEBUG("power scale %lf", powerScale);
   p_availTrace = new CpuTiTgmr(powerTrace, powerScale);
 
-  CpuTiActionPtr action;
+  CpuTiActionPtr action = NULL;
   p_actionSet = xbt_swag_new(xbt_swag_offset(*action, p_cpuListHookup));
 
   xbt_dynar_get_cpy(powerPeak, 0, &m_powerPeak);
index 5bae319..66d2a31 100644 (file)
@@ -250,7 +250,7 @@ void surf_network_model_init_Vegas(void)
 
 void NetworkCm02Model::initialize()
 {
-  ActionLmm comm;
+  ActionLmmPtr comm = NULL;
 
   char *optim = xbt_cfg_get_string(_sg_cfg_set, "network/optim");
   int select =
@@ -282,7 +282,7 @@ void NetworkCm02Model::initialize()
   if (p_updateMechanism == UM_LAZY) {
        p_actionHeap = xbt_heap_new(8, NULL);
        xbt_heap_set_update_callback(p_actionHeap, surf_action_lmm_update_index_heap);
-       p_modifiedSet = xbt_swag_new(xbt_swag_offset(comm, p_actionListHookup));
+       p_modifiedSet = xbt_swag_new(xbt_swag_offset(*comm, p_actionListHookup));
        p_maxminSystem->keep_track = p_modifiedSet;
   }
 }
index 366e6ed..fb04ba6 100644 (file)
@@ -425,7 +425,7 @@ Model::Model(string name)
    m_actSuspendCB(0), m_actCancelCB(0), m_actResumeCB(0),
    p_maxminSystem(0)
 {
-  ActionPtr action;
+  ActionPtr action = NULL;
   p_readyActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));
   p_runningActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));
   p_failedActionSet = xbt_swag_new(xbt_swag_offset(*action, p_stateHookup));