diff --git a/libfprint/nbis/mindtct/loop.c b/libfprint/nbis/mindtct/loop.c
index 847c43f..2142d18 100644
--- a/libfprint/nbis/mindtct/loop.c
+++ b/libfprint/nbis/mindtct/loop.c
@@ -509,7 +509,6 @@ int process_loop_V2(MINUTIAE *minutiae,
              unsigned char *bdata, const int iw, const int ih,
              int *plow_flow_map, const LFSPARMS *lfsparms)
 {
-   int halfway;
    int idir, type, appearing;
    double min_dist, max_dist;
    int min_fr, max_fr, min_to, max_to;
@@ -529,9 +528,6 @@ int process_loop_V2(MINUTIAE *minutiae,
       /* Get pixel value of feature's interior. */
       feature_pix = *(bdata + (contour_y[0] * iw) + contour_x[0]);
 
-      /* Compute half the perimeter of the loop. */
-      halfway = ncontour>>1;
-
       /* Get the aspect dimensions of the loop in units of */
       /* squared distance.                                 */
       get_loop_aspect(&min_fr, &min_to, &min_dist,