502b48f4db8d753de5e0fe3e4592ea4fb1f872d1 |
|
17-Oct-2016 |
William Roberts <william.c.roberts@intel.com> |
libselinux: fix required alignment for sha1.c on mac When building on mac with ANDROID_HOST=y, clang complains: sha1.c:73:33: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'CHAR64LONG16 *' increases required alignment from 1 to 4 [-Werror,-Wcast-align] CHAR64LONG16* block = (CHAR64LONG16*) workspace; Rather then casting the bytearray to the CHAR64LONG16 union, just create a stack workspace of type CHAR64LONG16. This will prevent alignment issues with the data accesses. Signed-off-by: William Roberts <william.c.roberts@intel.com>
/external/selinux/libselinux/src/sha1.c
|