diff --git a/test/avdtp/Makefile b/test/avdtp/Makefile index 07a0117e2..da9524f84 100644 --- a/test/avdtp/Makefile +++ b/test/avdtp/Makefile @@ -28,7 +28,7 @@ COMMON += \ sdp_util.c \ sdp_server.c \ -CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Werror +CFLAGS += -g -Wall -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wunused-variable -Wunused-parameter -Werror CFLAGS += -I. CFLAGS += -I${BTSTACK_ROOT}/src CFLAGS += -I${BTSTACK_ROOT}/src/classic diff --git a/test/avdtp/avdtp_test.c b/test/avdtp/avdtp_test.c index 1b45677e5..4b54059d4 100644 --- a/test/avdtp/avdtp_test.c +++ b/test/avdtp/avdtp_test.c @@ -181,6 +181,7 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, (void) timeInfo; /* Prevent unused variable warnings. */ (void) statusFlags; (void) inputBuffer; + (void) userData; int bytes_to_copy = framesPerBuffer * BYTES_PER_FRAME; @@ -213,9 +214,15 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, #ifdef DECODE_SBC static void handle_pcm_data(int16_t * data, int num_samples, int num_channels, int sample_rate, void * context){ + UNUSED(sample_rate); + UNUSED(context); + +#ifdef STORE_SBC_TO_WAV_FILE wav_writer_write_int16(num_samples*num_channels, data); - total_num_samples+=num_samples*num_channels; frame_count++; +#endif + + total_num_samples+=num_samples*num_channels; #ifdef HAVE_PORTAUDIO if (!pa_stream_started){ @@ -326,6 +333,9 @@ static void close_media_processing(void){ } static void handle_l2cap_media_data_packet(avdtp_stream_endpoint_t * stream_endpoint, uint8_t *packet, uint16_t size){ + + UNUSED(stream_endpoint); + int pos = 0; avdtp_media_packet_header_t media_header; @@ -405,6 +415,10 @@ static void dump_sbc_configuration(avdtp_media_codec_configuration_sbc_t configu static void packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *packet, uint16_t size){ + + UNUSED(channel); + UNUSED(size); + bd_addr_t event_addr; switch (packet_type) { @@ -595,6 +609,9 @@ static void stdin_process(btstack_data_source_t *ds, btstack_data_source_callbac int btstack_main(int argc, const char * argv[]); int btstack_main(int argc, const char * argv[]){ + UNUSED(argc); + (void)argv; + /* Register for HCI events */ hci_event_callback_registration.callback = &packet_handler; hci_add_event_handler(&hci_event_callback_registration); diff --git a/test/avdtp/avdtp_util.c b/test/avdtp/avdtp_util.c index 816347fa1..505dfd2b1 100644 --- a/test/avdtp/avdtp_util.c +++ b/test/avdtp/avdtp_util.c @@ -98,6 +98,8 @@ int avdtp_read_signaling_header(avdtp_signaling_packet_t * signaling_header, uin } int avdtp_pack_service_capabilities(uint8_t * buffer, int size, avdtp_capabilities_t caps, avdtp_service_category_t category, uint8_t pack_all_capabilities){ + UNUSED(size); + int i; // pos = 0 reserved for length int pos = 1; diff --git a/test/avdtp/portaudio_test.c b/test/avdtp/portaudio_test.c index 34ca6369c..0c47189b4 100644 --- a/test/avdtp/portaudio_test.c +++ b/test/avdtp/portaudio_test.c @@ -70,6 +70,7 @@ static int total_num_samples = 0; static char * wav_filename = "portaudio_sine.wav"; static void write_wav_data(int16_t * data, int num_frames, int num_channels, int sample_rate){ + (void)sample_rate; wav_writer_write_int16(num_frames*num_channels, data); total_num_samples+=num_frames*num_channels; if (total_num_samples>5*SAMPLE_RATE) wav_writer_close(); @@ -105,7 +106,8 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, (void) timeInfo; /* Prevent unused variable warnings. */ (void) statusFlags; (void) inputBuffer; - + (void) userData; + uint32_t bytes_read = 0; int bytes_per_buffer = framesPerBuffer * BYTES_PER_FRAME; @@ -120,6 +122,9 @@ static int patestCallback( const void *inputBuffer, void *outputBuffer, int main(int argc, const char * argv[]){ + (void) argc; + (void) argv; + PaError err; static paTestData data; static PaStream * stream;