Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix dead assignments.
[simgrid.git] / src / surf / surf_interface.cpp
index 7c325f9..a4d47c2 100644 (file)
@@ -520,7 +520,7 @@ double Model::shareResourcesLazy(double now)
 {
   ActionPtr action = NULL;
   double min = -1;
-  double share, time_to_completion;
+  double share;
 
   XBT_DEBUG
       ("Before share resources, the size of modified actions set is %zd",
@@ -547,10 +547,10 @@ double Model::shareResourcesLazy(double now)
     action->updateRemainingLazy(now);
 
     min = -1;
-    time_to_completion = -1;
     share = lmm_variable_getvalue(action->getVariable());
 
     if (share > 0) {
+      double time_to_completion;
       if (action->getRemains() > 0) {
         time_to_completion = action->getRemainsNoUpdate() / share;
       } else {
@@ -779,11 +779,6 @@ void Action::initialize(ModelPtr model, double cost, bool failed,
   m_hat = NOTSET;
 }
 
-Action::Action()
-{
-  initialize(NULL, 0.0, false); // FIXME: not used
-}
-
 Action::Action(ModelPtr model, double cost, bool failed)
 {
   initialize(model, cost, failed);