diff --git a/cudablas/compute/cuda_ztsmlq.c b/cudablas/compute/cuda_ztsmlq.c
index fa949538f7782eb169a3ceb5fe237f4dc046fe05..2dcfc24158a77a0427ed00bd294a72b55a97f238 100644
--- a/cudablas/compute/cuda_ztsmlq.c
+++ b/cudablas/compute/cuda_ztsmlq.c
@@ -33,7 +33,6 @@ int CUDA_ztsmlq(
     CUBLAS_STREAM_PARAM)
 {
     int i, i1, i3;
-    int NW;
     int kb;
     int ic = 0;
     int jc = 0;
@@ -45,14 +44,6 @@ int CUDA_ztsmlq(
         return -1;
     }
 
-    /* NW is the minimum dimension of WORK */
-    if (side == ChamLeft) {
-        NW = IB;
-    }
-    else {
-        NW = N1;
-    }
-
     if ((trans != ChamNoTrans) && (trans != ChamConjTrans)) {
         return -2;
     }
diff --git a/cudablas/compute/cuda_ztsmqr.c b/cudablas/compute/cuda_ztsmqr.c
index 6a655a5401d1f1f7830afcbd19d4e2579fb48fa6..e731dfbf451bb06ab0d9f519292b529c04bfe00a 100644
--- a/cudablas/compute/cuda_ztsmqr.c
+++ b/cudablas/compute/cuda_ztsmqr.c
@@ -33,7 +33,7 @@ int CUDA_ztsmqr(
     CUBLAS_STREAM_PARAM)
 {
     int i, i1, i3;
-    int NQ, NW;
+    int NQ;
     int kb;
     int ic = 0;
     int jc = 0;
@@ -48,11 +48,9 @@ int CUDA_ztsmqr(
     /* NQ is the order of Q */
     if (side == ChamLeft) {
         NQ = M2;
-        NW = IB;
     }
     else {
         NQ = N2;
-        NW = M1;
     }
 
     if ((trans != ChamNoTrans) && (trans != ChamConjTrans)) {
diff --git a/cudablas/compute/cuda_zttmlq.c b/cudablas/compute/cuda_zttmlq.c
index ddde1ed384df7bcb5ce7360de93bdfc3aaa926e2..c194adfe7f7c76847a4b64feaa9b0d5b560eb78b 100644
--- a/cudablas/compute/cuda_zttmlq.c
+++ b/cudablas/compute/cuda_zttmlq.c
@@ -33,7 +33,6 @@ int CUDA_zttmlq(
         CUBLAS_STREAM_PARAM)
 {
     int i, i1, i3;
-    int NW;
     int kb, l;
     int ic = 0;
     int jc = 0;
@@ -47,14 +46,6 @@ int CUDA_zttmlq(
         return -1;
     }
 
-    /* NQ is the order of Q */
-    if (side == ChamLeft) {
-        NW = IB;
-    }
-    else {
-        NW = N1;
-    }
-
     if ((trans != ChamNoTrans) && (trans != ChamConjTrans)) {
         return -2;
     }
diff --git a/cudablas/compute/cuda_zttmqr.c b/cudablas/compute/cuda_zttmqr.c
index e2a91ee817915b5453d79bfc987e0345ecab0022..8664d0675afdb82b60e92bf054caa45122c7ec89 100644
--- a/cudablas/compute/cuda_zttmqr.c
+++ b/cudablas/compute/cuda_zttmqr.c
@@ -33,7 +33,7 @@ int CUDA_zttmqr(
         CUBLAS_STREAM_PARAM)
 {
     int i, i1, i3;
-    int NQ, NW;
+    int NQ;
     int kb, l;
     int ic = 0;
     int jc = 0;
@@ -50,11 +50,9 @@ int CUDA_zttmqr(
     /* NQ is the order of Q */
     if (side == ChamLeft) {
         NQ = M2;
-        NW = IB;
     }
     else {
         NQ = N2;
-        NW = M1;
     }
 
     if ((trans != ChamNoTrans) && (trans != ChamConjTrans)) {