From dbdf18dcc0c90b2fce178f317c40db3eb8c8c024 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Mon, 1 Feb 2021 11:26:39 +0800 Subject: [PATCH] Increase alignment requirements of uc8_t to avoid warnings when interpreting as uint16_t --- dsp-types.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsp-types.h b/dsp-types.h index 6eaaa8d..a3ef98d 100644 --- a/dsp-types.h +++ b/dsp-types.h @@ -6,7 +6,7 @@ typedef struct { uint8_t I; uint8_t Q; -} __attribute__((packed)) uc8_t; +} __attribute__((__packed__, __aligned__(2))) uc8_t; typedef union { uc8_t uc8; @@ -16,6 +16,6 @@ typedef union { typedef struct { int16_t I; int16_t Q; -} __attribute__((packed)) sc16_t; +} __attribute__((__packed__)) sc16_t; #endif