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

Fix [-Wrestrict] bug #289

Merged
merged 2 commits into from
Apr 13, 2021
Merged

Fix [-Wrestrict] bug #289

merged 2 commits into from
Apr 13, 2021

Conversation

henrygab
Copy link

@henrygab henrygab commented Mar 25, 2021

Should fix #253, where the issue is well documented.

WARNING: ENTIRELY UNTESTED (although trivial) CODE.

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.

spotted on, strcpy and memcpy are declared with restricted pointer, they may have optimization that causes issue with overlapped memory. For example using uint32_t copy/assign on 32-bit platform.

@hathach
Copy link
Member

hathach commented Apr 2, 2021

Let me know when you think the PR is ready for review/merge. The changes look good to me.

@henrygab henrygab marked this pull request as ready for review April 2, 2021 22:13
@henrygab
Copy link
Author

henrygab commented Apr 2, 2021

I must ask for help to test this. Real life prevents me from testing this soon. My hope is it's simple enough to test. I am happy to mark this ready for review, knowing you will test this before merge.

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.

need logic change in the for loop

cores/arduino/WString.cpp Show resolved Hide resolved
@henrygab henrygab marked this pull request as draft April 8, 2021 23:07
@henrygab henrygab marked this pull request as ready for review April 9, 2021 00:52
@henrygab henrygab requested a review from hathach April 13, 2021 02:59
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.

it is perfect now

@hathach hathach merged commit ade7caf into adafruit:master Apr 13, 2021
@henrygab henrygab deleted the patch-2 branch April 13, 2021 06:45
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.

Build warnings -- [-Wrestrict]
2 participants