shithub: aubio

Download patch

ref: 54bf84727272dee8b9618ae9322838a9dd07d909
parent: 651b97eb39b1ac6e05830882ba7c44e2b942e27d
author: Paul Brossier <piem@altern.org>
date: Mon Aug 8 16:09:49 EDT 2005

fix gcc-4.0 type warnings

--- a/ext/midi/midi_file.c
+++ b/ext/midi/midi_file.c
@@ -150,7 +150,7 @@
   if (aubio_midi_file_read(mf, mthd, 14) != AUBIO_OK) {
     return AUBIO_FAIL;
   }
-  if ((AUBIO_STRNCMP(mthd, "MThd", 4) != 0) || (mthd[7] != 6) || (mthd[9] > 2)) {
+  if ((AUBIO_STRNCMP((const char*)mthd, "MThd", 4) != 0) || (mthd[7] != 6) || (mthd[9] > 2)) {
     AUBIO_ERR( "Doesn't look like a MIDI file: invalid MThd header");
     return AUBIO_FAIL;
   }
--- a/src/resample.c
+++ b/src/resample.c
@@ -33,8 +33,8 @@
 
 aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type) {
 	aubio_resampler_t * s  = AUBIO_NEW(aubio_resampler_t);
-	uint_t error = 0;
-	s->stat = src_new (type, 1, (uint_t*)error) ; /* only one channel */
+	sint_t error = 0;
+	s->stat = src_new (type, 1, (sint_t*)error) ; /* only one channel */
 	s->proc = AUBIO_NEW(SRC_DATA);
 	if (error) AUBIO_ERR("%s\n",src_strerror(error));
 	s->ratio = ratio;