diff options
author | Peter Harper <peter.harper@raspberrypi.com> | 2024-06-13 17:23:35 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-06-26 13:57:45 +1000 |
commit | 9111fa58312440fbddb4e67e9966386b3890d8d6 (patch) | |
tree | 54b8f1d5a493103efa731748caf60b03c8fe0b18 /shared/tinyusb/mp_usbd_runtime.c | |
parent | e35f13a22df63cfa165a5fac7f8236a0d0711e77 (diff) |
shared/tinyusb/mp_usbd_runtime: Fix pointer comparison in assert.
Addresses build warning "comparison of distinct pointer types lacks a
cast".
Fixes issue #15276.
Signed-off-by: Peter Harper <peter.harper@raspberrypi.com>
Diffstat (limited to 'shared/tinyusb/mp_usbd_runtime.c')
-rw-r--r-- | shared/tinyusb/mp_usbd_runtime.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shared/tinyusb/mp_usbd_runtime.c b/shared/tinyusb/mp_usbd_runtime.c index e10d1cb3f..fe28a4a72 100644 --- a/shared/tinyusb/mp_usbd_runtime.c +++ b/shared/tinyusb/mp_usbd_runtime.c @@ -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); |