Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix warnings
[simgrid.git] / src / mc / mc_global.c
index 2471803..59a4b7e 100644 (file)
@@ -177,7 +177,7 @@ static void dw_variable_free_voidp(void *t){
 
 // object_info
 
-mc_object_info_t MC_new_object_info() {
+mc_object_info_t MC_new_object_info(void) {
   mc_object_info_t res = xbt_new(s_mc_object_info_t, 1);
   res->file_name = NULL;
   res->start_text = NULL;
@@ -920,7 +920,6 @@ void MC_dwarf_get_variables(mc_object_info_t info) {
 
     }else if(strcmp(node_type, "(DW_TAG_base_type)") == 0 
              || strcmp(node_type, "(DW_TAG_enumeration_type)") == 0
-             || strcmp(node_type, "(DW_TAG_enumerator)") == 0
              || strcmp(node_type, "(DW_TAG_typedef)") == 0
              || strcmp(node_type, "(DW_TAG_const_type)") == 0
              || strcmp(node_type, "(DW_TAG_subroutine_type)") == 0
@@ -933,8 +932,6 @@ void MC_dwarf_get_variables(mc_object_info_t info) {
         type_type = e_dw_base_type;
       else if(strcmp(node_type, "(DW_TAG_enumeration_type)") == 0)
         type_type = e_dw_enumeration_type;
-      else if(strcmp(node_type, "(DW_TAG_enumerator)") == 0)
-        type_type = e_dw_enumerator;
       else if(strcmp(node_type, "(DW_TAG_typedef)") == 0)
         type_type = e_dw_typedef;
       else if(strcmp(node_type, "(DW_TAG_const_type)") == 0)
@@ -1001,15 +998,11 @@ void MC_dwarf_get_variables(mc_object_info_t info) {
       type->id = (void *)strtoul(origin, NULL, 16);
       if(type_origin)
         type->dw_type_id = xbt_strdup(type_origin);
-      if(type_type == e_dw_enumerator) {
-        type->element_count = enumeration_size;
-        type->byte_size = size;
-      }
-      else {
-        type->byte_size = size;
-        // Not relevant:
-        type->element_count = -1;
-      }
+
+      type->byte_size = size;
+      // Not relevant:
+      type->element_count = -1;
+
       type->members = NULL;
 
       xbt_dict_set(*types, origin, type, NULL); 
@@ -1297,9 +1290,9 @@ static void MC_post_process_types(mc_object_info_t info) {
   dw_type_t type;
   xbt_dict_foreach(info->types, cursor, origin, type){
     if(type->type==e_dw_array_type) {
-      xbt_assert(type->dw_type_id, "No base type for array %s %s", type->id, type->name);
+      xbt_assert(type->dw_type_id, "No base type for array <%p>%s", type->id, type->name);
       dw_type_t subtype = xbt_dict_get_or_null(info->types, type->dw_type_id);
-         xbt_assert(subtype, "Unkown base type for array %s %s", type->id, type->name);
+         xbt_assert(subtype, "Unkown base type for array <%p>%s", type->id, type->name);
       type->byte_size = type->element_count*subtype->byte_size;
     }
   }