From 956830170d9bdfae2fc838522e1d96f9fa4f91fc Mon Sep 17 00:00:00 2001 From: guoshichao Date: Tue, 10 Sep 2024 19:26:05 +0800 Subject: [PATCH] greenhills: fix the data type align build error "/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx/include/nuttx/crypto/blake2s.h", line 91: error #2118-D: this attribute reduces the alignment of the typedef, and while that will be respected for struct/field layout, the compiler will not generate code to handle misaligned accesses for objects of this type typedef uint32_t uint32_alias_t __attribute__((may_alias)) aligned_data(1); ^ Signed-off-by: guoshichao --- include/nuttx/crypto/blake2s.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/nuttx/crypto/blake2s.h b/include/nuttx/crypto/blake2s.h index b6d1f89ec23..da16981888c 100644 --- a/include/nuttx/crypto/blake2s.h +++ b/include/nuttx/crypto/blake2s.h @@ -88,8 +88,8 @@ typedef struct blake2s_param__ #ifdef __GNUC__ > 3 #define BLAKE2_UNALIGNED 1 -typedef uint32_t uint32_alias_t __attribute__((may_alias)) aligned_data(1); -typedef uint16_t uint16_alias_t __attribute__((may_alias)) aligned_data(1); +typedef uint32_t uint32_alias_t __attribute__((may_alias)); +typedef uint16_t uint16_alias_t __attribute__((may_alias)); #endif /****************************************************************************