commit | 7e07922b122ffa1721819eba7617ecd44b1fb7f9 | [log] [tgz] |
---|---|---|
author | Stephen Hines <srhines@google.com> | Wed Dec 07 03:46:10 2016 -0800 |
committer | Stephen Hines <srhines@google.com> | Wed Dec 07 03:46:55 2016 -0800 |
tree | 133068fb814cce23716f5a6c3166835669421cfd | |
parent | 4ec1b8b0699d37ed9025de606fce91b2ff2405d9 [diff] |
Switch to memcpy for accessing misaligned data. Bug: http://b/31532493 Using misaligned pointers forces us to potentially take the address of members in a packed structure (which is now a warning/error in the latest Clang). Using memcpy() is the proper way to handle this kind of problem, as the compiler can insert the proper instructions (and usually elide the memcpy() entirely). Test: Built correctly with updated compilers. Change-Id: Ia1f6eb62cf19404ff76b71d3c6c7ffffa1403120