X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/174d02656fd194d1773e8fd5b4f6d51c159839cd..9e4875c2d328b4708ff67275882a164446db8d1e:/src/dict_unit.c diff --git a/src/dict_unit.c b/src/dict_unit.c index 55ac0e86d7..56e96f220b 100644 --- a/src/dict_unit.c +++ b/src/dict_unit.c @@ -14,7 +14,8 @@ #include "portable.h" XBT_LOG_EXTERNAL_CATEGORY(xbt_dict); -XBT_LOG_DEFAULT_CATEGORY(xbt_dict); +XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict, xbt, + "Dictionaries provide the same functionalities than hash tables"); static void print_str(void *str) @@ -363,6 +364,7 @@ XBT_TEST_UNIT("nulldata", test_dict_nulldata, "NULL data management") } static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) { + uintptr_t stored_data = 0; xbt_test_log2("Add %zu under %zu", data, key); xbt_dicti_set(head, key, data); @@ -370,7 +372,7 @@ static void debuged_addi(xbt_dict_t head, uintptr_t key, uintptr_t data) { xbt_dict_dump(head, (void (*)(void *)) &printf); fflush(stdout); } - uintptr_t stored_data = xbt_dicti_get(head, key); + stored_data = xbt_dicti_get(head, key); xbt_test_assert3(stored_data==data, "Retrieved data (%zu) is not what I just stored (%zu) under key %zu",stored_data,data,key); }