diff options
| author | hathach <[email protected]> | 2025-10-14 17:33:56 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-10-14 17:33:56 +0700 |
| commit | 0a2b6e77da336e7fa579f194cb16a7160d5dab02 (patch) | |
| tree | f0308e166209e21abacd20f38f2a3f04584fb8eb /examples | |
| parent | a5fde08285a10a87a1f374913dfe7edfafbe383d (diff) | |
more warnings fix
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/uac2_speaker_fb/src/main.c | 4 | ||||
| -rw-r--r-- | examples/host/cdc_msc_hid_freertos/src/hid_app.c | 1 | ||||
| -rw-r--r-- | examples/host/device_info/src/main.c | 4 | ||||
| -rw-r--r-- | examples/host/msc_file_explorer/CMakeLists.txt | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/examples/device/uac2_speaker_fb/src/main.c b/examples/device/uac2_speaker_fb/src/main.c index ed9e7716d..e742dc52a 100644 --- a/examples/device/uac2_speaker_fb/src/main.c +++ b/examples/device/uac2_speaker_fb/src/main.c @@ -159,7 +159,7 @@ static bool tud_audio_clock_get_request(uint8_t rhport, audio_control_request_t if (request->bControlSelector == AUDIO_CS_CTRL_SAM_FREQ) { if (request->bRequest == AUDIO_CS_REQ_CUR) { - TU_LOG1("Clock get current freq %lu\r\n", current_sample_rate); + TU_LOG1("Clock get current freq %" PRIu32 "\r\n", current_sample_rate); audio_control_cur_4_t curf = {(int32_t) tu_htole32(current_sample_rate)}; return tud_audio_buffer_and_schedule_control_xfer(rhport, (tusb_control_request_t const *) request, &curf, sizeof(curf)); @@ -200,7 +200,7 @@ static bool tud_audio_clock_set_request(uint8_t rhport, audio_control_request_t current_sample_rate = (uint32_t) ((audio_control_cur_4_t const *) buf)->bCur; - TU_LOG1("Clock set current freq: %ld\r\n", current_sample_rate); + TU_LOG1("Clock set current freq: %" PRIu32 "\r\n", current_sample_rate); return true; } else { diff --git a/examples/host/cdc_msc_hid_freertos/src/hid_app.c b/examples/host/cdc_msc_hid_freertos/src/hid_app.c index 0b4ee2c78..79e0b5a28 100644 --- a/examples/host/cdc_msc_hid_freertos/src/hid_app.c +++ b/examples/host/cdc_msc_hid_freertos/src/hid_app.c @@ -211,6 +211,7 @@ static void process_mouse_report(hid_mouse_report_t const *report) { //--------------------------------------------------------------------+ static void process_generic_report(uint8_t dev_addr, uint8_t instance, uint8_t const *report, uint16_t len) { (void) dev_addr; + (void) len; uint8_t const rpt_count = hid_info[instance].report_count; tuh_hid_report_info_t *rpt_info_arr = hid_info[instance].report_info; diff --git a/examples/host/device_info/src/main.c b/examples/host/device_info/src/main.c index 419806551..f71702efc 100644 --- a/examples/host/device_info/src/main.c +++ b/examples/host/device_info/src/main.c @@ -171,9 +171,7 @@ void tuh_mount_cb(uint8_t daddr) { printf("\r\n"); printf(" iSerialNumber %u ", desc.device.iSerialNumber); - printf((char*)desc.serial); // serial is already to UTF-8 - printf("\r\n"); - + printf("%s\r\n", (char*)desc.serial); // serial is already to UTF-8 printf(" bNumConfigurations %u\r\n", desc.device.bNumConfigurations); } diff --git a/examples/host/msc_file_explorer/CMakeLists.txt b/examples/host/msc_file_explorer/CMakeLists.txt index 5ac75c04a..95d532fc9 100644 --- a/examples/host/msc_file_explorer/CMakeLists.txt +++ b/examples/host/msc_file_explorer/CMakeLists.txt @@ -27,7 +27,7 @@ target_sources(${PROJECT} PUBLIC ) # Suppress warnings on fatfs -if (CMAKE_C_COMPILER_ID STREQUAL "GNU") +if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") set_source_files_properties( ${TOP}/lib/fatfs/source/ff.c PROPERTIES |
