diff options
| author | hathach <[email protected]> | 2022-06-27 11:50:17 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2022-06-27 11:50:17 +0700 |
| commit | b9dc9dbd78ee1890342429502d585f323c480fc2 (patch) | |
| tree | 922509c3012736c3b7b564c99d8c27ef77d60013 /examples/device/midi_test/src | |
| parent | 0042eccb3b2ff0f980f3a927a271364a2089ada5 (diff) | |
fix most warnings with rp2040 -wconversion
Diffstat (limited to 'examples/device/midi_test/src')
| -rw-r--r-- | examples/device/midi_test/src/usb_descriptors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/device/midi_test/src/usb_descriptors.c b/examples/device/midi_test/src/usb_descriptors.c index 8444237c6..c84a873b1 100644 --- a/examples/device/midi_test/src/usb_descriptors.c +++ b/examples/device/midi_test/src/usb_descriptors.c @@ -166,7 +166,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid) const char* str = string_desc_arr[index]; // Cap at max char - chr_count = strlen(str); + chr_count = (uint8_t) strlen(str); if ( chr_count > 31 ) chr_count = 31; // Convert ASCII string into UTF-16 @@ -177,7 +177,7 @@ uint16_t const* tud_descriptor_string_cb(uint8_t index, uint16_t langid) } // first byte is length (including header), second byte is string type - _desc_str[0] = (TUSB_DESC_STRING << 8 ) | (2*chr_count + 2); + _desc_str[0] = (uint16_t) ((TUSB_DESC_STRING << 8 ) | (2*chr_count + 2)); return _desc_str; } |
