From 35e66f1b2c4ea53b8d44b527e27cdd10e16b3d55 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Thu, 6 May 2021 23:38:41 +0200 Subject: [PATCH] Reduce scope for variable. --- src/s4u/s4u_Actor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s4u/s4u_Actor.cpp b/src/s4u/s4u_Actor.cpp index 2725b02654..42853860d0 100644 --- a/src/s4u/s4u_Actor.cpp +++ b/src/s4u/s4u_Actor.cpp @@ -314,12 +314,12 @@ bool is_maestro() void sleep_for(double duration) { xbt_assert(std::isfinite(duration), "duration is not finite!"); - static unsigned int warned = 0; // At most 20 such warnings if (duration <= 0) /* that's a no-op */ return; if (duration < sg_surf_precision) { + static unsigned int warned = 0; // At most 20 such warnings warned++; if (warned <= 20) XBT_INFO("The parameter to sleep_for() is smaller than the SimGrid numerical accuracy (%g < %g). " -- 2.20.1