pkg/nimble: Remove warning suppressions, add patches#10511
pkg/nimble: Remove warning suppressions, add patches#10511smlng merged 2 commits intoRIOT-OS:masterfrom
Conversation
Nimble contains a couple of casts that discard alignment information. This causes a warning with clang's -Wno-address-of-packed-member. A previous PR (RIOT-OS#10503) supressed that warning. This commit re-enables them and provides a patch to fix the offending code. The fix has been submitted upstream, see apache/mynewt-nimble#252
The -Wno-sometimes-uninitialized suppression seems to no longer be necessary. Removing it as it may mask a real bug. If the problem reappears, and if the comment is correct about it being only in an unused function, then instead of adding the CFLAG, it should be fixed locally via a patch.
smlng
left a comment
There was a problem hiding this comment.
Nice one! Patch looks good to me, also reverting the -Wno-...!
smlng
left a comment
There was a problem hiding this comment.
ACK, also checked with an older compiler, all good!
|
Thanks @smlng ! |
|
apache/mynewt-nimble#252 has been merged upstream. @haukepetersen, Is a version bump planned any time soon? I would not want to mess with this PKG myself. |
|
@haukepetersen , I'm also interested on when it is going to be upgraded as for the moment Travis is failing on RIOT build on Mynewt-nimble repo. BTW is there a way to build RIOT without any additional patches on Nimble? That might solve a problem for the future. |
Quickest way is to remove pkg/nimble/patches. |
|
yup, we just did it in our Travis. |
|
Sorry, this PR went under my radar somehow. I am creating a nimble version dump and some makefile optimization as we speak. The general plan is to keep updating the nimble version every other month or so (or lets say roughly every RIOT release) for now. |
Contribution description
This is a "slowfix" for the quickfix introduced in #10503 .
Pointer alignment
This is the most serious one.
Nimble contains a couple of casts that discard alignment information. This causes a warning with clang's -Wno-address-of-packed-member.
A previous PR (#10503) supressed that warning. This commit re-enables them and provides a patch to fix the offending code.
The fix has been submitted upstream, see apache/mynewt-nimble#252
The other warning.
The -Wno-sometimes-uninitialized suppression seems to no longer be necessary. Removing it as it may mask a real bug.
If the problem reappears, and if the comment is correct about it being only in an unused function, then instead of adding the CFLAG, it should be fixed locally via a patch.
Testing procedure
Compile with LLVM. You should see no warning. I tried Arch Linux and our Docker image:
in
examples/nimble_gatt:Issues/PRs references
Partially reverts #10503.
Upstream PR: apache/mynewt-nimble#252