From 3529decbb55dc7f65c97f215301af7f014668e47 Mon Sep 17 00:00:00 2001 From: lhausamm <loic_hausammann@hotmail.com> Date: Fri, 20 Oct 2017 12:06:12 +0200 Subject: [PATCH] Fix int-in-bool-context with gcc-7.2 --- src/scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/scheduler.c b/src/scheduler.c index b2466d5510..32ff8492e7 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -1596,6 +1596,7 @@ void scheduler_print_tasks(const struct scheduler *s, const char *fileName) { const int nr_tasks = s->nr_tasks, *tid = s->tasks_ind; struct task *t, *tasks = s->tasks; + int test_type; FILE *file = fopen(fileName, "w"); @@ -1603,7 +1604,8 @@ void scheduler_print_tasks(const struct scheduler *s, const char *fileName) { for (int k = nr_tasks - 1; k >= 0; k--) { t = &tasks[tid[k]]; - if (!((1 << t->type)) || t->skip) continue; + test_type = 1 << t->type; + if (!(test_type) || t->skip) continue; fprintf(file, "%d %s %s %d %d\n", k, taskID_names[t->type], subtaskID_names[t->subtype], t->nr_unlock_tasks, t->wait); } -- GitLab