From: Paul Brossier Date: Mon, 21 Jul 2014 02:00:41 +0000 (-0500) Subject: src/spectral/phasevoc.c: fix argument checks X-Git-Tag: 0.4.4~306 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=3c5ee41bb71f7999413be79cf2ab8b31ede10657;p=aubio.git src/spectral/phasevoc.c: fix argument checks --- 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);