fix compiler warning in task.c