Skip to content

Commit

Permalink
shared/tinyusb/mp_usbd_runtime.c: Fix assert.
Browse files Browse the repository at this point in the history
Addresses build warning
"comparison of distinct pointer types lacks a cast"

Fixes #15276
  • Loading branch information
peterharperuk committed Jun 13, 2024
1 parent 715ea8c commit 2a292fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/tinyusb/mp_usbd_runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static uint8_t _runtime_dev_count_itfs(tusb_desc_interface_t const *itf_desc) {
const tusb_desc_configuration_t *cfg_desc = (const void *)tud_descriptor_configuration_cb(0);
const uint8_t *p_desc = (const void *)cfg_desc;
const uint8_t *p_end = p_desc + cfg_desc->wTotalLength;
assert(p_desc <= itf_desc && itf_desc < p_end);
assert(p_desc <= (const uint8_t*)itf_desc && (const uint8_t*)itf_desc < p_end);
while (p_desc != (const void *)itf_desc && p_desc < p_end) {
const uint8_t *next = tu_desc_next(p_desc);

Expand Down

0 comments on commit 2a292fb

Please sign in to comment.