Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Define const get_iface().
[simgrid.git] / src / xbt / log.cpp
index 7f4da38243394787e443112cccbaeb8b5fa8d611..ae51917ec53705a02778bc897dc476c2c64b3ab9 100644 (file)
@@ -76,8 +76,8 @@ void xbt_log_preinit(void)
   log_cat_init_mutex                   = new std::recursive_mutex();
 }
 
-static void xbt_log_help(void);
-static void xbt_log_help_categories(void);
+static void xbt_log_help();
+static void xbt_log_help_categories();
 
 /** @brief Get all logging settings from the command line
  *
@@ -437,18 +437,15 @@ static xbt_log_setting_t _xbt_log_parse_setting(const char *control_string)
 
 static xbt_log_category_t _xbt_log_cat_searchsub(xbt_log_category_t cat, const char* name)
 {
-  xbt_log_category_t child;
-  xbt_log_category_t res;
-
   XBT_DEBUG("Search '%s' into '%s' (firstChild='%s'; nextSibling='%s')", name,
          cat->name, (cat->firstChild ? cat->firstChild->name : "none"),
          (cat->nextSibling ? cat->nextSibling->name : "none"));
   if (strcmp(cat->name, name) == 0)
     return cat;
 
-  for (child = cat->firstChild; child != nullptr; child = child->nextSibling) {
+  for (xbt_log_category_t child = cat->firstChild; child != nullptr; child = child->nextSibling) {
     XBT_DEBUG("Dig into %s", child->name);
-    res = _xbt_log_cat_searchsub(child, name);
+    xbt_log_category_t res = _xbt_log_cat_searchsub(child, name);
     if (res)
       return res;
   }
@@ -548,7 +545,7 @@ void xbt_log_additivity_set(xbt_log_category_t cat, int additivity)
   cat->additivity = additivity;
 }
 
-static void xbt_log_help(void)
+static void xbt_log_help()
 {
   XBT_HELP(
       "Description of the logging output:\n"
@@ -640,7 +637,7 @@ static void xbt_log_help_categories_rec(xbt_log_category_t category, const std::
   }
 }
 
-static void xbt_log_help_categories(void)
+static void xbt_log_help_categories()
 {
   XBT_HELP("Current log category hierarchy:");
   xbt_log_help_categories_rec(&_XBT_LOGV(XBT_LOG_ROOT_CAT), "   ");