Skip to content

Fix for pgm_read_ptr macro #43

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

Merged
merged 1 commit into from
Aug 23, 2017
Merged

Fix for pgm_read_ptr macro #43

merged 1 commit into from
Aug 23, 2017

Conversation

nkrkv
Copy link
Contributor

@nkrkv nkrkv commented Aug 23, 2017

There’s an error in avr/pgmspace.h that leads to errors if one uses pgm_read_ptr macro on SAM platform:

.../cores/arduino/avr/pgmspace.h:106:49: error: 'const void*' is not a pointer-to-object type
 #define pgm_read_ptr(addr) (*(const void *)(addr))
                                                 ^

Given the double indirection (the first is addr and the second is data itself) we should use void**, not void*.

Fixes #35

@cmaglie cmaglie merged commit 2a17b0d into arduino:master Aug 23, 2017
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