xbt_dict_foreach(files, cursor, name, file) {
unsigned int cpt1, cpt2;
- SD_task_t newfile = NULL;
+ SD_task_t newfile;
SD_dependency_t depbefore, depafter;
if (xbt_dynar_is_empty(file->tasks_before)) {
xbt_dynar_foreach(file->tasks_after, cpt2, depafter) {
- SD_task_t newfile =
- SD_task_create_comm_e2e(file->name, NULL, file->amount);
+ newfile = SD_task_create_comm_e2e(file->name, NULL, file->amount);
SD_task_dependency_add(NULL, NULL, root_task, newfile);
SD_task_dependency_add(NULL, NULL, newfile, depafter->dst);
#ifdef HAVE_TRACING
}
} else if (xbt_dynar_is_empty(file->tasks_after)) {
xbt_dynar_foreach(file->tasks_before, cpt2, depbefore) {
- SD_task_t newfile =
- SD_task_create_comm_e2e(file->name, NULL, file->amount);
+ newfile = SD_task_create_comm_e2e(file->name, NULL, file->amount);
SD_task_dependency_add(NULL, NULL, depbefore->src, newfile);
SD_task_dependency_add(NULL, NULL, newfile, end_task);
#ifdef HAVE_TRACING
("File %s is produced and consumed by task %s. This loop dependency will prevent the execution of the task.",
file->name, depbefore->src->name);
}
- newfile =
- SD_task_create_comm_e2e(file->name, NULL, file->amount);
+ newfile = SD_task_create_comm_e2e(file->name, NULL, file->amount);
SD_task_dependency_add(NULL, NULL, depbefore->src, newfile);
SD_task_dependency_add(NULL, NULL, newfile, depafter->dst);
#ifdef HAVE_TRACING
/* set the size of table routing */
size_t table_size = xbt_dict_length(rc->to_index);
int *src_id, *dst_id;
- int i,j;
src_id = xbt_dict_get_or_null(rc->to_index, src);
dst_id = xbt_dict_get_or_null(rc->to_index, dst);
if(!as->link_table)
{
+ int i,j;
/* Create Cost, Predecessor and Link tables */
as->cost_table = xbt_new0(double, table_size * table_size); /* link cost from host to host */
as->predecessor_table = xbt_new0(int, table_size * table_size); /* predecessor host numbers */
/* to extract the addresses from the backtrace */
char **addrs;
- char buff[256], *p;
+ char buff[256];
/* To read the output of addr2line */
FILE *pipe;
/* build the commandline */
if (stat(xbt_binary_name, &stat_buf)) {
/* Damn. binary not in current dir. We'll have to dig the PATH to find it */
- int i;
-
for (i = 0; environ[i]; i++) {
if (!strncmp("PATH=", environ[i], 5)) {
xbt_dynar_t path = xbt_str_split(environ[i] + 5, ":");
addrs = xbt_new(char *, e->used);
for (i = 0; i < e->used; i++) {
+ char *p;
/* retrieve this address */
XBT_DEBUG("Retrieving address number %d from '%s'", i, backtrace_syms[i]);
snprintf(buff, 256, "%s", strchr(backtrace_syms[i], '[') + 1);