diff --git a/src/AudioGeneratorAAC.cpp b/src/AudioGeneratorAAC.cpp index fded623..7b72bb7 100644 --- a/src/AudioGeneratorAAC.cpp +++ b/src/AudioGeneratorAAC.cpp @@ -117,7 +117,7 @@ bool AudioGeneratorAAC::FillBufferWithValidFrame() if (nextSync >= 0) nextSync += lastFrameEnd; lastFrameEnd = 0; if (nextSync == -1) { - if (buff[buffValid-1]==0xff) { // Could be 1st half of syncword, preserve it... + if (buffValid && buff[buffValid-1]==0xff) { // Could be 1st half of syncword, preserve it... buff[0] = 0xff; buffValid = file->read(buff+1, buffLen-1); if (buffValid==0) return false; // No data available, EOF diff --git a/src/AudioGeneratorMP3.cpp b/src/AudioGeneratorMP3.cpp index 6954a30..538e5b9 100644 --- a/src/AudioGeneratorMP3.cpp +++ b/src/AudioGeneratorMP3.cpp @@ -336,6 +336,9 @@ extern "C" { #else void stack(const char *s, const char *t, int i) { + (void) s; + (void) t; + (void) i; } int stackfree() { diff --git a/src/libmad/config.h b/src/libmad/config.h index e72019e..0b50c3a 100644 --- a/src/libmad/config.h +++ b/src/libmad/config.h @@ -13,7 +13,7 @@ extern "C" { # endif extern int stackfree(); # ifdef __cplusplus -}; +} # endif /* Define to enable experimental code. */ diff --git a/src/libmad/frame.c b/src/libmad/frame.c index 1ad1e64..1facef8 100644 --- a/src/libmad/frame.c +++ b/src/libmad/frame.c @@ -104,6 +104,7 @@ void mad_frame_init(struct mad_frame *frame) */ void mad_frame_finish(struct mad_frame *frame) { + (void) frame; mad_header_finish(&frame->header); } diff --git a/src/libmad/stream.c b/src/libmad/stream.c index e959206..837cd9e 100644 --- a/src/libmad/stream.c +++ b/src/libmad/stream.c @@ -65,6 +65,7 @@ stack(__FUNCTION__, __FILE__, __LINE__); void mad_stream_finish(struct mad_stream *stream) { stack(__FUNCTION__, __FILE__, __LINE__); + (void) stream; mad_bit_finish(&stream->anc_ptr); mad_bit_finish(&stream->ptr); diff --git a/tests/host/Makefile b/tests/host/Makefile index 2ead48e..b416bdb 100644 --- a/tests/host/Makefile +++ b/tests/host/Makefile @@ -28,8 +28,8 @@ libflac=../../src/libflac/md5.c ../../src/libflac/window.c ../../src/libflac/mem ../../src/libflac/stream_decoder.c ../../src/libflac/float.c -CCOPTS=-g -Wall -m32 -include Arduino.h -CPPOPTS=-g -Wall -std=c++11 -m32 -include Arduino.h +CCOPTS=-g -Wunused-parameter -Wall -m32 -include Arduino.h +CPPOPTS=-g -Wunused-parameter -Wall -std=c++11 -m32 -include Arduino.h mp3: FORCE rm -f *.o diff --git a/tests/host/aac.cpp b/tests/host/aac.cpp index 0857925..a9a99b9 100644 --- a/tests/host/aac.cpp +++ b/tests/host/aac.cpp @@ -20,4 +20,6 @@ int main(int argc, char **argv) delete aac; delete out; delete in; + + free(space); }