Browse Source

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>
pull/15279/head
Peter Harper 5 months ago
committed by Damien George
parent
commit
9111fa5831
  1. 2
      shared/tinyusb/mp_usbd_runtime.c

2
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);

Loading…
Cancel
Save