From 3c5ee41bb71f7999413be79cf2ab8b31ede10657 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 20 Jul 2014 21:00:41 -0500 Subject: [PATCH] src/spectral/phasevoc.c: fix argument checks --- src/spectral/phasevoc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/spectral/phasevoc.c b/src/spectral/phasevoc.c index c6fcdf49..c0f622a6 100644 --- a/src/spectral/phasevoc.c +++ b/src/spectral/phasevoc.c @@ -76,11 +76,11 @@ aubio_pvoc_t * new_aubio_pvoc (uint_t win_s, uint_t hop_s) { AUBIO_WRN("Hop size bigger than half the window size!\n"); } */ - if (hop_s < 1) { + if ((sint_t)hop_s < 1) { AUBIO_ERR("got hop_size %d, but can not be < 1\n", hop_s); goto beach; - } else if (win_s < 1) { - AUBIO_ERR("got buffer_size %d, but can not be < 2\n", win_s); + } else if ((sint_t)win_s < 1) { + AUBIO_ERR("got buffer_size %d, but can not be < 1\n", win_s); goto beach; } else if (win_s < hop_s) { AUBIO_ERR("hop size (%d) is larger than win size (%d)\n", win_s, hop_s); -- 2.11.0