hathach / tinyusb

An open source cross-platform USB stack for embedded system
https://www.tinyusb.org
MIT License
4.93k stars 1.03k forks source link

audio_device.c: fix strict-overflow warning with gcc >= 12 #2691

Closed ra1nb0w closed 3 months ago

ra1nb0w commented 3 months ago

Describe the PR Fix the following error

~/libs/tinyusb/src/class/audio/audio_device.c:1493:23: error: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Werror=strict-overflow]
 1493 |         while (p_desc < p_desc_end)
      |                ~~~~~~~^~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
HiFiPhile commented 3 months ago

Thanks, there was some leftover not changed.

ra1nb0w commented 3 months ago

I fix now. one second

ra1nb0w commented 3 months ago

done. and what do you think about https://github.com/hathach/tinyusb/issues/2690 ?

ra1nb0w commented 3 months ago

thank you