From c08295c26e7710f67045230969a3b5b84c7b6df8 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Fri, 17 Jan 2014 10:20:06 +0100 Subject: [PATCH] [mc] Fix warnings --- src/mc/mc_checkpoint.c | 3 ++- src/mc/mc_global.c | 6 +++--- src/mc/mc_private.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index a4fe970e59..4b8283bd34 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -4,7 +4,8 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include +#define _GNU_SOURCE +#include #include "mc_private.h" #include "xbt/module.h" diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 07c7800b49..59a4b7e325 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -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; @@ -1290,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; } } diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index 9d68c04e93..9d438f7a90 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -330,7 +330,7 @@ typedef struct s_mc_object_info { xbt_dict_t types; // xbt_dict_t } s_mc_object_info_t, *mc_object_info_t; -mc_object_info_t MC_new_object_info(); +mc_object_info_t MC_new_object_info(void); mc_object_info_t MC_find_object_info(memory_map_t maps, char* name); void MC_free_object_info(mc_object_info_t* p); -- 2.20.1