fix signed/unsigned mismatches in examples
authorPaul Brossier <piem@altern.org>
Sat, 3 Jun 2006 15:13:07 +0000 (15:13 +0000)
committerPaul Brossier <piem@altern.org>
Sat, 3 Jun 2006 15:13:07 +0000 (15:13 +0000)
fix signed/unsigned mismatches in examples

examples/aubionotes.c
examples/aubioonset.c
examples/aubioquiet.c
examples/aubiotrack.c
examples/utils.c

index 9780b95..11abb43 100644 (file)
@@ -25,7 +25,7 @@ int aubio_process(float **input, float **output, int nframes);
 int aubio_process(float **input, float **output, int nframes) {
   unsigned int i;       /*channels*/
   unsigned int j;       /*frames*/
-  for (j=0;j<nframes;j++) {
+  for (j=0;j<(unsigned)nframes;j++) {
     if(usejack) {
       for (i=0;i<channels;i++) {
         /* write input to datanew */
index bd8f627..67c0395 100644 (file)
@@ -25,7 +25,7 @@ int aubio_process(float **input, float **output, int nframes);
 int aubio_process(float **input, float **output, int nframes) {
   unsigned int i;       /*channels*/
   unsigned int j;       /*frames*/
-  for (j=0;j<nframes;j++) {
+  for (j=0;j<(unsigned)nframes;j++) {
     if(usejack) {
       for (i=0;i<channels;i++) {
         /* write input to datanew */
index 7161f6b..a9c3f46 100644 (file)
@@ -26,7 +26,7 @@ int aubio_process(float **input, float **output, int nframes);
 int aubio_process(float **input, float **output, int nframes) {
   unsigned int i;       /*channels*/
   unsigned int j;       /*frames*/
-  for (j=0;j<nframes;j++) {
+  for (j=0;j<(unsigned)nframes;j++) {
     if(usejack) {
       for (i=0;i<channels;i++) {
         /* write input to datanew */
index 8c29129..6da2514 100644 (file)
@@ -34,7 +34,7 @@ int aubio_process(float **input, float **output, int nframes) {
   unsigned int i;       /*channels*/
   unsigned int j;       /*frames*/
   smpl_t * btoutput = out->data[0];
-  for (j=0;j<nframes;j++) {
+  for (j=0;j<(unsigned)nframes;j++) {
     if(usejack) {
       for (i=0;i<channels;i++) {
         /* write input to datanew */
index f6e076d..889e9d0 100644 (file)
@@ -338,7 +338,7 @@ void examples_common_process(aubio_process_func_t process_func, aubio_print_func
 
     frames = 0;
 
-    while (overlap_size == aubio_sndfile_read(file, overlap_size, ibuf))
+    while ((signed)overlap_size == aubio_sndfile_read(file, overlap_size, ibuf))
     {
       isonset=0;
       process_func(ibuf->data, obuf->data, overlap_size);