diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-03-04 14:20:37 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-05-06 20:11:53 +0000 |
commit | 13b2bbc4f99c7e21a913c439a99cd1bdb402e45b (patch) | |
tree | 4c970e6d68024031f99b9641a6e6be5505e7ef76 /include/battery.h | |
parent | e0a4e5ab99a45faa196b3894ade8c375061a7ab6 (diff) | |
download | chrome-ec-13b2bbc4f99c7e21a913c439a99cd1bdb402e45b.tar.gz |
Specify type for forward-declared enums
C++ does not allow enums to be forward declared unless they have a type.
BRANCH=none
BUG=b:144959033
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I6fcdedc81f2b60a44b750554939e60552a4c6a77
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740567
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include/battery.h')
-rw-r--r-- | include/battery.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/battery.h b/include/battery.h index 9df702cadf..666b18c091 100644 --- a/include/battery.h +++ b/include/battery.h @@ -9,6 +9,7 @@ #define __CROS_EC_BATTERY_H #include "common.h" +#include "compiler.h" #include "host_command.h" /* Battery index, only used with CONFIG_BATTERY_V2. */ @@ -56,7 +57,7 @@ extern struct ec_response_battery_dynamic_info * Sometimes we have hardware to detect battery present, sometimes we have to * wait until we've been able to talk to the battery. */ -enum battery_present { +FORWARD_DECLARE_ENUM(battery_present) { BP_NOT_INIT = -1, BP_NO = 0, BP_YES = 1, |