You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/11/29 12:49:05 UTC

[GitHub] jcarrano opened a new pull request #252: L2CAP sm: do not discard alignment information.

jcarrano opened a new pull request #252: L2CAP sm: do not discard alignment information.
URL: https://github.com/apache/mynewt-nimble/pull/252
 
 
   ### Description
   
   `ble_sm_gen_ediv` and `ble_sm_gen_master_id_rand` took a simple pointer to integers, but were being called with pointers to members of a packed struct. This discarded the alignment information.
   
   Not only did it produce an error with clang's -Wno-address-of-packed-member, but it may also cause an error in a platform with alignment requirements.
   
   The solution was to modify both procedures to take a pointer to the whole structure instead of only the members.
   
   _This is my first contribution to this project, so please excuse if there is anything not OK with the commit/pr._
   
   ### How to test
   
   Compile with clang, with the `-Wno-address-of-packed-member`. The warning should be gone with this patch.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services