Restrict scope of step and step_rel
[alexxy/gromacs.git] / src / gromacs / mdrun / md.cpp
index 3b7466c229cc2c2d8ff49f68d5d2ce3e1bb9b9c5..1490fd893c3573e367103f4ca80b943b28f295ce 100644 (file)
@@ -167,7 +167,6 @@ void gmx::LegacySimulator::do_md()
     // will go away eventually.
     const t_inputrec* ir = inputrec;
 
-    int64_t      step, step_rel;
     double       t, t0 = ir->init_t;
     gmx_bool     bGStatEveryStep, bGStat, bCalcVir, bCalcEnerStep, bCalcEner;
     gmx_bool     bNS = FALSE, bNStList, bStopCM, bFirstStep, bInitStep, bLastStep = FALSE;
@@ -802,8 +801,8 @@ void gmx::LegacySimulator::do_md()
     bExchanged       = FALSE;
     bNeedRepartition = FALSE;
 
-    step     = ir->init_step;
-    step_rel = 0;
+    int64_t step     = ir->init_step;
+    int64_t step_rel = 0;
 
     auto stopHandler = stopHandlerBuilder->getStopHandlerMD(
             compat::not_null<SimulationSignal*>(&signals[eglsSTOPCOND]),