shithub: aubio

Download patch

ref: 10a6f7d1b9567bbcd521c3f92d8fab2b421879c7
parent: 17fc762ee9053ce357db49bcb11e01696bbadea9
author: Paul Brossier <piem@piem.org>
date: Sun Jul 15 12:35:56 EDT 2012

src/tempo/beattracking.c: cast to avoid signed/unsigned comparison

--- a/src/tempo/beattracking.c
+++ b/src/tempo/beattracking.c
@@ -159,7 +159,7 @@
   /* compute shift invariant comb filterbank */
   for (i = 1; i < laglen - 1; i++) {
     for (a = 1; a <= numelem; a++) {
-      for (b = (1 - a); b < a; b++) {
+      for (b = (1 - a); b < (sint_t)a; b++) {
         bt->acfout->data[i] += bt->acf->data[a * (i + 1) + b - 1]
             * 1. / (2. * a - 1.);
       }
@@ -299,7 +299,7 @@
     fvec_zeros (acfout);
     for (i = 1; i < laglen - 1; i++) {
       for (a = 1; a <= bt->timesig; a++) {
-        for (b = (1 - a); b < a; b++) {
+        for (b = (1 - a); b < (sint_t)a; b++) {
           acfout->data[i] += acf->data[a * (i + 1) + b - 1];
         }
       }