Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

ra1nb0w
Copy link
Contributor

@ra1nb0w ra1nb0w commented Jun 28, 2024

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
Copy link
Collaborator

Thanks, there was some leftover not changed.

@ra1nb0w
Copy link
Contributor Author

ra1nb0w commented Jun 28, 2024

I fix now. one second

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.
@ra1nb0w
Copy link
Contributor Author

ra1nb0w commented Jun 28, 2024

done. and what do you think about #2690 ?

@HiFiPhile HiFiPhile merged commit 7125ac2 into hathach:master Jun 28, 2024
75 of 76 checks passed
@ra1nb0w ra1nb0w deleted the strict-overflow branch June 28, 2024 09:29
@ra1nb0w
Copy link
Contributor Author

ra1nb0w commented Jun 28, 2024

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants