From 6ce074f093df1251fa618c350f01453e7d2bcede Mon Sep 17 00:00:00 2001 From: mquinson Date: Tue, 11 Sep 2007 08:56:57 +0000 Subject: [PATCH] Actually, do not initialize at all the buffer to build the logs in the log event. No need for this to be zeroed. So, we do a partial initialization of the whole log event, but we already did this before since the category field is to be initialized with a non-constant value, so we do so right after with an initialization so that old and picky compilers (sun8 cc, borland) shut their mouth up. Also reorder the fields to help aligning git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@4149 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- include/xbt/log.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/xbt/log.h b/include/xbt/log.h index efbd8680da..c28fbd0fa7 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -266,8 +266,8 @@ struct xbt_log_event_s { const char* fileName; const char* functionName; int lineNum; - char buffer[1024]; va_list ap; + char buffer[1024]; }; /** @@ -400,7 +400,7 @@ extern xbt_log_layout_t xbt_log_default_layout; #define _XBT_LOG_PRE(catv, priority) do { \ if (_XBT_LOG_ISENABLEDV(catv, priority)) { \ s_xbt_log_event_t _log_ev = \ - {NULL,priority,__FILE__,_XBT_FUNCTION,__LINE__,{'\0'}}; \ + {NULL,priority,__FILE__,_XBT_FUNCTION,__LINE__}; \ _log_ev.cat = &(catv); \ _xbt_log_event_log(&_log_ev \ -- 2.20.1