Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2c9c0125 authored by Stephen Hines's avatar Stephen Hines
Browse files

Properly align a packed structure.

Bug: http://b/31532493

Taking the address of a packed structure member only guarantees an
alignment of 1, so any use of that address could be misaligned.
Our latest toolchain will generate an error when these packed members
are accessed in an invalid manner. To remedy this, we can mark the
packed structure as having a stricter alignment (so that we can then
further reason about the packed members). We pick uint32_t because that
is the first field for this structure (and the one that is having its
address taken).

Test: Builds successfully with old and updated toolchain.
Change-Id: If98c05097953fbad8437fb04b0e207a85604ae1d
parent d94925cf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment