Skip to content

Commit 506617d

Browse files
authored
Add comment to explain why the condition changes
1 parent ac418f4 commit 506617d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/class/audio/audio_device.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1565,6 +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+
// Condition modified from p_desc < p_desc_end to prevent gcc>=12 strict-overflow warning
15681569
while (p_desc_end - p_desc > 0)
15691570
{
15701571
if (tu_desc_type(p_desc) == TUSB_DESC_ENDPOINT)

0 commit comments

Comments
 (0)