From ed07a8bd76e5c2ad380f9b9531775ee669b568bf Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 15 Nov 2023 15:08:46 +0100 Subject: [PATCH] le_audio_demo_util_sink: fix unused variable warninigs --- example/le_audio_demo_util_sink.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/example/le_audio_demo_util_sink.c b/example/le_audio_demo_util_sink.c index 9c34eaa33..bf72e3445 100644 --- a/example/le_audio_demo_util_sink.c +++ b/example/le_audio_demo_util_sink.c @@ -404,7 +404,7 @@ void le_audio_demo_util_sink_receive(uint8_t stream_index, uint8_t *packet, uint uint16_t offset = 4; uint32_t time_stamp = 0; if (ts_flag){ - uint32_t time_stamp = little_endian_read_32(packet, offset); + time_stamp = little_endian_read_32(packet, offset); offset += 4; } @@ -418,6 +418,12 @@ void le_audio_demo_util_sink_receive(uint8_t stream_index, uint8_t *packet, uint uint8_t packet_status_flag = (uint8_t) (header_2 >> 14); offset += 2; + // avoid warning for (yet) unused fields + UNUSED(con_handle); + UNUSED(pb_flag); + UNUSED(iso_load_len); + UNUSED(packet_status_flag); + // start with first packet on first stream if (group_last_packet_received == false){ if (stream_index != 0){