From 10a6f7d1b9567bbcd521c3f92d8fab2b421879c7 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 15 Jul 2012 16:35:56 -0600 Subject: [PATCH] src/tempo/beattracking.c: cast to avoid signed/unsigned comparison --- src/tempo/beattracking.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tempo/beattracking.c b/src/tempo/beattracking.c index 2c24561f..e7bb502c 100644 --- a/src/tempo/beattracking.c +++ b/src/tempo/beattracking.c @@ -159,7 +159,7 @@ aubio_beattracking_do (aubio_beattracking_t * bt, fvec_t * dfframe, /* 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 @@ aubio_beattracking_checkstate (aubio_beattracking_t * bt) 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]; } } -- 2.26.2