X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..7da44b26eb7f4da0d4ce7672f479dea4d01767b3:/examples/gras/properties/properties.c diff --git a/examples/gras/properties/properties.c b/examples/gras/properties/properties.c index 8f93be050e..b0ae355e49 100644 --- a/examples/gras/properties/properties.c +++ b/examples/gras/properties/properties.c @@ -21,7 +21,7 @@ int alice(int argc, char *argv[]) xbt_dict_cursor_t cursor = NULL; char *key, *data; - const char *value; + _XBT_GNUC_UNUSED const char *value; /* Let the other process change the host props */ gras_os_sleep(1); @@ -37,18 +37,18 @@ int alice(int argc, char *argv[]) XBT_INFO("== Try to get a process property that does not exist"); value = gras_process_property_value("Nonexisting"); - xbt_assert0(!value, "nonexisting property exists!!"); + xbt_assert(!value, "nonexisting property exists!!"); /* Modify an existing property. First check it exists */ XBT_INFO("== Trying to modify a process property"); value = gras_process_property_value("new prop"); - xbt_assert0(!value, "Property 'new prop' exists before I add it!"); + xbt_assert(!value, "Property 'new prop' exists before I add it!"); xbt_dict_set(process_props, "new prop", xbt_strdup("new value"), xbt_free_f); /* Test if we have changed the value */ value = gras_process_property_value("new prop"); - xbt_assert1(!strcmp(value, "new value"), + xbt_assert(!strcmp(value, "new value"), "New property does have the value I've set ('%s' != 'new value')", value); @@ -64,7 +64,7 @@ int bob(int argc, char *argv[]) xbt_dict_t host_props = gras_os_host_properties(); xbt_dict_cursor_t cursor = NULL; char *key, *data; - const char *value; + _XBT_GNUC_UNUSED const char *value; XBT_INFO("== Dump all the properties of host1"); xbt_dict_foreach(host_props, cursor, key, data) @@ -72,7 +72,7 @@ int bob(int argc, char *argv[]) XBT_INFO("== Try to get a property that does not exist"); value = gras_os_host_property_value("non existing key"); - xbt_assert1(value == NULL, + xbt_assert(value == NULL, "The key 'non existing key' exists (with value '%s')!!", value);