From 954056da0ca4633d27f022858600164721963104 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 25 May 2021 21:02:40 +0700 Subject: fix warnings cast function type for nrf, fix pico osal warning add TODO for overflow in tusb_fifo.c --- examples/make.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/make.mk b/examples/make.mk index 6366d6cef..df8bfd617 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -88,6 +88,7 @@ CFLAGS += \ -fno-strict-aliasing \ -Wdouble-promotion \ -Wstrict-prototypes \ + -Wstrict-overflow \ -Wall \ -Wextra \ -Werror \ @@ -100,7 +101,8 @@ CFLAGS += \ -Wsign-compare \ -Wmissing-format-attribute \ -Wunreachable-code \ - -Wcast-align + -Wcast-align \ + -Wcast-function-type # Debugging/Optimization ifeq ($(DEBUG), 1) -- cgit v1.3.1 From aca2320075e6cad95e7c53a68c7633585d8db7e4 Mon Sep 17 00:00:00 2001 From: noodlefighter Date: Wed, 26 May 2021 11:45:45 +0800 Subject: fix uac2_headset example tud_audio_rx_done_cb() is departed, replace with tud_audio_rx_done_pre_read_cb() --- examples/device/uac2_headset/src/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/device/uac2_headset/src/main.c b/examples/device/uac2_headset/src/main.c index 57abafe6c..1b6a770a3 100644 --- a/examples/device/uac2_headset/src/main.c +++ b/examples/device/uac2_headset/src/main.c @@ -332,13 +332,14 @@ bool tud_audio_set_itf_cb(uint8_t rhport, tusb_control_request_t const * p_reque return true; } -bool tud_audio_rx_done_cb(uint8_t rhport, uint8_t *buffer, uint16_t buf_size) +bool tud_audio_rx_done_pre_read_cb(uint8_t rhport, uint16_t n_bytes_received, uint8_t func_id, uint8_t ep_out, uint8_t cur_alt_setting) { (void)rhport; + (void)func_id; + (void)ep_out; + (void)cur_alt_setting; - spk_data_size = buf_size; - memcpy(spk_buf, buffer, buf_size); - + spk_data_size = tud_audio_read(spk_buf, n_bytes_received); return true; } -- cgit v1.3.1