-
Notifications
You must be signed in to change notification settings - Fork 64
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
Sign conversion warnings #74
Comments
Hi @holden-zenith, Thanks for pointing this out. The cache maintenance functions convert forth and back between signed and unsigned which is probably causing your warnings. Would you like to contribute reworked versions of the functions that work for you? Thanks, |
I think the issue is the definition
Changing this as below should solve the problem. But perhaps there is a timing reason for the previous code:
|
@holden-zenith, can you confirm the reworked code provided by Reinhard solves the issue your you while it is still performing correctly? |
@JonatanAntoni well it definitely resolves the warning in that function which would also need to be applied to the others, but changing the do while to a while will obviously change the functionality depending on isize. Are you supposed to manually verify isize is >= __SCB_ICACHE_LINE_SIZE before calling this? |
Good spot. Basically, the idea of the loop is that at least
A problem could result from an integer overflow in |
When using gcc 11.3 & 12.3, there are sign conversion warnings in armv7m_cachel1.h with most usages of __SCB_DCACHE_LINE_SIZE and __SCB_ICACHE_LINE_SIZE in that file.
The text was updated successfully, but these errors were encountered: