X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/326904d37b52f089be0403e9549fddf3212c966c..0c259b6fb45cece5af1c16f45893a13a4087fd49:/src/surf/surfxml_parse.c diff --git a/src/surf/surfxml_parse.c b/src/surf/surfxml_parse.c index 4ec4445db3..c8d2f0cfba 100644 --- a/src/surf/surfxml_parse.c +++ b/src/surf/surfxml_parse.c @@ -23,20 +23,20 @@ void nil_function(void) return; } -void_f_void_t STag_surfxml_platform_description_fun = nil_function; -void_f_void_t ETag_surfxml_platform_description_fun = nil_function; -void_f_void_t STag_surfxml_cpu_fun = nil_function; -void_f_void_t ETag_surfxml_cpu_fun = nil_function; -void_f_void_t STag_surfxml_network_link_fun = nil_function; -void_f_void_t ETag_surfxml_network_link_fun = nil_function; -void_f_void_t STag_surfxml_route_fun = nil_function; -void_f_void_t ETag_surfxml_route_fun = nil_function; -void_f_void_t STag_surfxml_route_element_fun = nil_function; -void_f_void_t ETag_surfxml_route_element_fun = nil_function; -void_f_void_t STag_surfxml_process_fun = nil_function; -void_f_void_t ETag_surfxml_process_fun = nil_function; -void_f_void_t STag_surfxml_argument_fun = nil_function; -void_f_void_t ETag_surfxml_argument_fun = nil_function; +void_f_void_t *STag_surfxml_platform_description_fun = nil_function; +void_f_void_t *ETag_surfxml_platform_description_fun = nil_function; +void_f_void_t *STag_surfxml_cpu_fun = nil_function; +void_f_void_t *ETag_surfxml_cpu_fun = nil_function; +void_f_void_t *STag_surfxml_network_link_fun = nil_function; +void_f_void_t *ETag_surfxml_network_link_fun = nil_function; +void_f_void_t *STag_surfxml_route_fun = nil_function; +void_f_void_t *ETag_surfxml_route_fun = nil_function; +void_f_void_t *STag_surfxml_route_element_fun = nil_function; +void_f_void_t *ETag_surfxml_route_element_fun = nil_function; +void_f_void_t *STag_surfxml_process_fun = nil_function; +void_f_void_t *ETag_surfxml_process_fun = nil_function; +void_f_void_t *STag_surfxml_argument_fun = nil_function; +void_f_void_t *ETag_surfxml_argument_fun = nil_function; YY_BUFFER_STATE surf_input_buffer; FILE *surf_file_to_parse; @@ -168,8 +168,12 @@ void ETag_surfxml_argument(void) } void surf_parse_open(const char *file) { + static int warned = 0; /* warn only once */ 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) @@ -202,7 +206,7 @@ static int _surf_parse(void) return surf_parse_lex(); } -int_f_void_t surf_parse = _surf_parse; +int_f_void_t *surf_parse = _surf_parse; void surf_parse_get_double(double *value,const char *string) {