From b7b97499014d97156e58575fdf588fcba3e7e26c Mon Sep 17 00:00:00 2001 From: Yaroslav Chvanov Date: Sat, 20 May 2023 00:05:00 +0300 Subject: [PATCH] sinowealth-nubwo: correctly use an attribute This erroneously declared it with name `__packed__` instead of using it as an attribute. It doesn't seem like it changes struct's size, but it has no static_assert on it so we can't be 100% sure. --- src/driver-sinowealth-nubwo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver-sinowealth-nubwo.c b/src/driver-sinowealth-nubwo.c index 34160ae9..1f64f509 100644 --- a/src/driver-sinowealth-nubwo.c +++ b/src/driver-sinowealth-nubwo.c @@ -79,7 +79,8 @@ sinowealthnubwo_aesthetic_report { uint8_t brightness; // 0x01 to 0x03 uint8_t tempo; // 0x05 0x03 0x01 uint8_t padzero2[16*3+1]; -} __packed__; +} __attribute__((packed)); +// FIXME: there is a missing static assert of size here. static uint8_t AESTHETIC_CMD[] = {0x06, 0xbb, 0xaa, 0x2a, 0x00, 0x0a, 0x00};