Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
energy: less code dupplication
[simgrid.git] / src / surf / surfxml_parse.c
index e7f1b45..4764cb9 100644 (file)
@@ -374,7 +374,7 @@ void surf_parse_free_callbacks(void)
 /* Stag and Etag parse functions */
 
 void STag_surfxml_platform(void) {
-  _XBT_GNUC_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
+  XBT_ATTRIB_UNUSED double version = surf_parse_get_double(A_surfxml_platform_version);
 
   xbt_assert((version >= 1.0), "******* BIG FAT WARNING *********\n "
       "You're using an ancient XML file.\n"
@@ -1029,6 +1029,7 @@ void surf_parse_open(const char *file)
   if (!surf_parsed_filename_stack)
     surf_parsed_filename_stack = xbt_dynar_new(sizeof(char *), &xbt_free_ref);
 
+  surf_parsed_filename = xbt_strdup(file);
   char *dir = xbt_dirname(file);
   xbt_dynar_push(surf_path, &dir);