Skip to content

Commit ac418f4

Browse files
committed
Fix strict-overflow warning when compiling with gcc >= 12
1 parent 338ff2d commit ac418f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/class/audio/audio_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,7 @@ uint16_t audiod_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uin
15651565
{
15661566
uint8_t const *p_desc = _audiod_fct[i].p_desc;
15671567
uint8_t const *p_desc_end = p_desc + _audiod_fct[i].desc_length - TUD_AUDIO_DESC_IAD_LEN;
1568-
while (p_desc < p_desc_end)
1568+
while (p_desc_end - p_desc > 0)
15691569
{
15701570
if (tu_desc_type(p_desc) == TUSB_DESC_ENDPOINT)
15711571
{

0 commit comments

Comments
 (0)