From: mquinson Date: Mon, 31 Jul 2006 08:51:53 +0000 (+0000) Subject: No need to warn the user 4 times. Instead, explaining what's going on may help ;) X-Git-Tag: v3.3~2709 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/40ae856c53d026ccb98eae6068730cb3796b5e8c?hp=3c7f8070aa73f3cf0c8ad0b799d46aa581a4437e No need to warn the user 4 times. Instead, explaining what's going on may help ;) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2650 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 785a41d24e..84294fec2f 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -168,8 +168,12 @@ void ETag_surfxml_argument(void) } void surf_parse_open(const char *file) { + static int warned = 0; if(!file) { - WARN0("I hope you know what you're doing... you just gave me a NULL pointer!"); + if (!warned) { + WARN0("Bypassing the XML parser since surf_parse_open received a NULL pointer. If it is not what you want, go fix your code."); + warned = 1; + } return; } if(!surf_input_buffer_stack)