Increase alignment requirements of uc8_t to avoid warnings when interpreting as uint16_t

This commit is contained in:
Oliver Jowett 2021-02-01 11:26:39 +08:00
parent 3eb2783cdf
commit dbdf18dcc0
1 changed files with 2 additions and 2 deletions

View File

@ -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