summaryrefslogtreecommitdiff
path: root/examples/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-14 17:33:56 +0700
committerhathach <[email protected]>2025-10-14 17:33:56 +0700
commit0a2b6e77da336e7fa579f194cb16a7160d5dab02 (patch)
treef0308e166209e21abacd20f38f2a3f04584fb8eb /examples/host
parenta5fde08285a10a87a1f374913dfe7edfafbe383d (diff)
more warnings fix
Diffstat (limited to 'examples/host')
-rw-r--r--examples/host/cdc_msc_hid_freertos/src/hid_app.c1
-rw-r--r--examples/host/device_info/src/main.c4
-rw-r--r--examples/host/msc_file_explorer/CMakeLists.txt2
3 files changed, 3 insertions, 4 deletions
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