diff --git a/src/scheduler.c b/src/scheduler.c
index 8cdc4b0f9ce46bfd3204934f2c13e974af205c54..6ef83179709437964b902ec531380a3b18068841 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -1134,10 +1134,6 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
 
 struct task *scheduler_done(struct scheduler *s, struct task *t) {
 
-  int k, res;
-  struct task *t2, *next = NULL;
-  struct cell *super = t->ci->super;
-
   /* Release whatever locks this task held. */
   if (!t->implicit) task_unlock(t);