Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix compile_warnings
[simgrid.git] / src / mc / mc_checkpoint.c
index e72bef316a2c4d3866715d4bf75280407dd3e897..d80a0048383cfb6f35569b02d2bd85354fe0c2cd 100644 (file)
@@ -163,7 +163,7 @@ static void MC_resolve_subtype(mc_object_info_t info, dw_type_t type) {
   // Try to find a more complete description of the type:
   // We need to fix in order to support C++.
 
-  dw_type_t subtype = xbt_dict_get_or_null(info->types_by_name, type->subtype->name);
+  dw_type_t subtype = xbt_dict_get_or_null(info->full_types_by_name, type->subtype->name);
   if(subtype!=NULL) {
     type->subtype = subtype;
   }
@@ -482,9 +482,9 @@ uintptr_t mc_untranslate_address(void* addr, mc_snapshot_t snapshot) {
 
   for(size_t i=0; i!=NB_REGIONS; ++i) {
     mc_mem_region_t region = snapshot->regions[i];
-    if(addr>=region->data && addr<=region->data+region->size) {
+    if(addr>=region->data && addr<=(void*)(((char*)region->data)+region->size)) {
       size_t offset = (size_t) ((char*) addr - (char*) region->data);
-      return (uintptr_t) (region->start_addr + offset);
+      return ((uintptr_t) region->start_addr) + offset;
     }
   }