diff --git a/src/queue.c b/src/queue.c
index dc601abfd16011411349f65f9f1e6d00664d1cd6..d52a9ac2c457b1fd50756be9028aa647845d276c 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -130,7 +130,7 @@ void queue_init ( struct queue *q , struct task *tasks ) {
  * @param keep Remove the returned task from this queue.
  */
  
-struct task *queue_gettask ( struct queue *q , int qid , struct cell *super , int blocking ) {
+struct task *queue_gettask ( struct queue *q , struct cell *super , int blocking ) {
 
     int k, temp, qcount, *qtid, gotcha;
     lock_type *qlock = &q->lock;
diff --git a/src/queue.h b/src/queue.h
index 66444db8a9df11597f2a71299e12e59f6054312d..76ae9b6971e456af17f338561eaecb5670172d21 100644
--- a/src/queue.h
+++ b/src/queue.h
@@ -51,6 +51,6 @@ struct queue {
     
 
 /* Function prototypes. */
-struct task *queue_gettask ( struct queue *q , int qid , struct cell *super , int blocking );
+struct task *queue_gettask ( struct queue *q , struct cell *super , int blocking );
 void queue_init ( struct queue *q , struct task *tasks );
 void queue_insert ( struct queue *q , struct task *t );
diff --git a/src/scheduler.c b/src/scheduler.c
index 3b08ad9d5a372c53b0509c84c13b71453409cb61..056d0183ace4e5d5a12094672e3785634abcb3d2 100644
--- a/src/scheduler.c
+++ b/src/scheduler.c
@@ -850,7 +850,7 @@ struct task *scheduler_gettask ( struct scheduler *s , int qid , struct cell *su
         for ( int tries = 0 ; res == NULL && s->waiting && tries < scheduler_maxtries ; tries++ ) {
         
             /* Try to get a task from the suggested queue. */
-            if ( s->queues[qid].count > 0 && ( res = queue_gettask( &s->queues[qid] , qid , super , 1 ) ) != NULL )
+            if ( s->queues[qid].count > 0 && ( res = queue_gettask( &s->queues[qid] , super , 1 ) ) != NULL )
                 break;
 
             /* If unsucessful, try stealing from the other queues. */
@@ -861,7 +861,7 @@ struct task *scheduler_gettask ( struct scheduler *s , int qid , struct cell *su
                         qids[ count++ ] = k;
                 for ( k = 0 ; k < scheduler_maxsteal && count > 0 ; k++ ) {
                     int ind = rand() % count;
-                    if ( ( res = queue_gettask( &s->queues[ qids[ ind ] ] , qid , super , 0 ) ) != NULL )
+                    if ( ( res = queue_gettask( &s->queues[ qids[ ind ] ] , super , 0 ) ) != NULL )
                         break;
                     else 
                         qids[ ind ] = qids[ --count ];