From: mquinson Date: Thu, 1 Apr 2010 14:11:10 +0000 (+0000) Subject: Modifiers working both on 32bits and 64bits to display uintptr_t X-Git-Tag: SVN~319 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/5c471ea7cf2c1ea761f5896ecf97c72e8134ee30 Modifiers working both on 32bits and 64bits to display uintptr_t git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7421 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/src/simix/smx_network.c b/src/simix/smx_network.c index 91eef6bb9e..213e31d221 100644 --- a/src/simix/smx_network.c +++ b/src/simix/smx_network.c @@ -389,7 +389,7 @@ void SIMIX_message_sizes_output(const char *filename) { uintptr_t key,data; xbt_dict_cursor_t cursor; xbt_dict_foreach(msg_sizes,cursor,key,data) { - fprintf(out,"%ld %ld\n",key,data); + fprintf(out,"%ld %ld\n",(long unsigned)key,(long unsigned)data); } fclose(out); } diff --git a/src/xbt/dict.c b/src/xbt/dict.c index 602ef21b2a..7791309262 100644 --- a/src/xbt/dict.c +++ b/src/xbt/dict.c @@ -510,7 +510,7 @@ XBT_INLINE void xbt_dicti_set(xbt_dict_t dict, xbt_dictelm_t current, previous = NULL; xbt_assert(dict); - DEBUG5("ADD %ld->%ld; hash = %d, size = %d, & = %d", key, data, hash_code, + DEBUG5("ADD %zu->%zu; hash = %d, size = %d, & = %d", key, data, hash_code, dict->table_size, hash_code & dict->table_size); current = dict->table[hash_code & dict->table_size]; while (current != NULL && @@ -587,7 +587,7 @@ XBT_INLINE void xbt_dicti_remove(xbt_dict_t dict, uintptr_t key) { } if (current == NULL) - THROW1(not_found_error, 0, "key %ld not found", key); + THROW1(not_found_error, 0, "key %zu not found", key); if (previous != NULL) { previous->next = current->next;