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

Cast to integral type ignores qualifier volatile #288

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

henrygab
Copy link

Attempting to cast to a volatile uint32_t does nothing different from cast to a uint32_t,
with the exception of looking like it's accessing a register.

Just remove the word volatile to fix.

Attempting to cast to a `volatile uint32_t` does nothing different from cast to a `uint32_t`,
with the exception of **_looking like_** it's accessing a register.
@henrygab
Copy link
Author

@hathach -- Here's another simple PR, no corresponding issue (as requested)

Copy link
Member

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you that the volatile cast do nothing and gcc is right to raise the warning, __text_start__ is a linker symbol.
Look like it is from the original repo https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/Reset.cpp#L31

You probably could submit a PR there as well.

@hathach hathach merged commit e340701 into adafruit:master Mar 29, 2021
henrygab added a commit to henrygab/ArduinoCore-samd that referenced this pull request Mar 29, 2021
"Cast to integral type ignores qualifier volatile"

Attempting to cast to a `volatile uint32_t` does nothing different from cast to a `uint32_t`,
with the exception of looking like it's doing something different.

Just remove the `volatile` qualifier to fix.

See also adafruit#288
@henrygab henrygab deleted the patch-1 branch March 29, 2021 23:44
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