diff --git a/quantum/action_util.h b/quantum/action_util.h index 72b4c56d013..c9d27ef92dc 100644 --- a/quantum/action_util.h +++ b/quantum/action_util.h @@ -36,8 +36,8 @@ typedef union { bool right_shift : 1; bool right_alt : 1; bool right_gui : 1; - } PACKED; -} mod_t; + }; +} PACKED mod_t; _Static_assert(sizeof(mod_t) == sizeof(uint8_t), "Invalid size for 'mod_t'"); extern report_keyboard_t *keyboard_report; diff --git a/quantum/led.h b/quantum/led.h index 669e93e1944..85819b20470 100644 --- a/quantum/led.h +++ b/quantum/led.h @@ -19,6 +19,7 @@ along with this program. If not, see . #include #include +#include "util.h" /* FIXME: Add doxygen comments here. */ @@ -36,7 +37,8 @@ typedef union { bool kana : 1; uint8_t reserved : 3; }; -} led_t; +} PACKED led_t; +_Static_assert(sizeof(led_t) == sizeof(uint8_t), "Invalid size for 'led_t'"); void led_set(uint8_t usb_led);