treewide: compile fixes for native#14663
Conversation
|
Feel free to squash |
Building on native reveals
error: ISO C forbids initialization between function pointer and ‘void *’
Let's disable that.
binary constants are a GCC extension
maribu
left a comment
There was a problem hiding this comment.
See inline. You can directly squash in the style nitpick. Regarding the -Wno-pedantic: Does this only affect code out of our control?
|
Is it only me, or are the inline comments gone? |
|
I don't see it |
|
OK, the comments was a another So, both comments are addressed already. |
maribu
left a comment
There was a problem hiding this comment.
ACK. This PR does three things:
- Use a different type name (
uint8_tinstead ofchar), which refers to the same type for all previously supported targets - Use hex instead of binary representation (
0x01instead of0xb00000001) of the same numbers - Store a function pointer into an
uint32_tinstead of anvoid *
The first two changes do obviously not change anything in the generated binaries. The third change resulted in identical binaries being build of tests/pkg_semtech-loramac for the nucleo-f767zi according to elf_diff. Thus, no regressions are expected.
Contribution description
charis unsigned on ARM but signed on x86.This lead to a few compile errors when adding the
periph_gpiofeature tonative, because now code that was previously never build for x86 got hit by this difference.The host compiler is also usually newer than the embedded one, which usually means it is stricter.
This makes offending
charsexplicitlyunsignedand works around some pedantry.Testing procedure
No logic changes. In fact, the binaries should stay the same.
Issues/PRs references
split off & needed for #12451
fixes #14667