From 8d9cce1e096fa9d35aae7a17bc5acb1adf44e18f Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Thu, 17 Nov 2022 12:09:12 +0100 Subject: ec/google/chromeec: Add packed attribute to structs in union Clang warns about structs inside a union also needing the packed attribute. This files is copied from the chromeec project, so it adds comment next to the coreboot specific changes as a reference. TEST: google/vilboz remains the same with BUILD_TIMELESS=1 and gcc. Change-Id: I8b5233618081db86caedcb2d14870974e109ed9b Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/69742 Tested-by: build bot (Jenkins) Reviewed-by: Martin L Roth --- src/ec/google/chromeec/ec_commands.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 0bb5db6081ec..7c311a1f5a21 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -4636,12 +4636,12 @@ struct ec_params_charge_state { struct __ec_todo_unpacked { uint32_t param; /* enum charge_state_param */ - } get_param; + } __ec_todo_packed get_param; /* coreboot change */ struct __ec_todo_unpacked { uint32_t param; /* param to set */ uint32_t value; /* value to set */ - } set_param; + } __ec_todo_packed set_param; /* coreboot change */ }; uint8_t chgnum; /* Version 1 supports chgnum */ } __ec_todo_packed; -- cgit v1.2.3