Add comment to explain why the condition changes
This commit is contained in:

committed by
GitHub

parent
ac418f4d25
commit
506617d4b3
@@ -1565,6 +1565,7 @@ uint16_t audiod_open(uint8_t rhport, tusb_desc_interface_t const * itf_desc, uin
|
|||||||
{
|
{
|
||||||
uint8_t const *p_desc = _audiod_fct[i].p_desc;
|
uint8_t const *p_desc = _audiod_fct[i].p_desc;
|
||||||
uint8_t const *p_desc_end = p_desc + _audiod_fct[i].desc_length - TUD_AUDIO_DESC_IAD_LEN;
|
uint8_t const *p_desc_end = p_desc + _audiod_fct[i].desc_length - TUD_AUDIO_DESC_IAD_LEN;
|
||||||
|
// Condition modified from p_desc < p_desc_end to prevent gcc>=12 strict-overflow warning
|
||||||
while (p_desc_end - p_desc > 0)
|
while (p_desc_end - p_desc > 0)
|
||||||
{
|
{
|
||||||
if (tu_desc_type(p_desc) == TUSB_DESC_ENDPOINT)
|
if (tu_desc_type(p_desc) == TUSB_DESC_ENDPOINT)
|
||||||
|
Reference in New Issue
Block a user