From 2e3a751b81e92b46193d492468465913178959db Mon Sep 17 00:00:00 2001 From: thiery Date: Tue, 29 Mar 2011 13:31:23 +0000 Subject: [PATCH 1/1] Protect recursive calls to _xbt_log_cat_init from this function. This fixes the tests tesh-self-* that were broken with NDEBUG. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9879 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/log.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xbt/log.c b/src/xbt/log.c index f9cd22fc89..fac60e04ce 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -1043,6 +1043,7 @@ void xbt_log_appender_set(xbt_log_category_t cat, xbt_log_appender_t app) void xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay) { +#define _xbt_log_cat_init(a, b) (0) if (!cat->appender) { XBT_VERB ("No appender to category %s. Setting the file appender as default", @@ -1057,6 +1058,7 @@ void xbt_log_layout_set(xbt_log_category_t cat, xbt_log_layout_t lay) } cat->layout = lay; xbt_log_additivity_set(cat, 0); +#undef _xbt_log_cat_init } void xbt_log_additivity_set(xbt_log_category_t cat, int additivity) -- 2.20.1