diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-07-26 10:48:01 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-26 18:05:49 +0000 |
commit | ae9448c6091478e652450af93b14463fe4269e2d (patch) | |
tree | 3ad159554bb99ec88e75aa27af610863ba04ce48 | |
parent | 62eeb2f6ed3cc122c25941a94e9ad56443245738 (diff) | |
download | chrome-ec-ae9448c6091478e652450af93b14463fe4269e2d.tar.gz |
ec: Can't declare variable after case label
C17 doesn't allow declaring variables after a case label. For some
reason clang does permit this, but gcc does not.
Add braces to fix declaration.
BRANCH=None
BUG=b:238433667, b:234181908
TEST=None
Change-Id: Iab42e43273d0e0f802c84ea4be12e414bc3135e1
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3787557
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | common/acpi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/acpi.c b/common/acpi.c index c6fe21f248..0b81be329a 100644 --- a/common/acpi.c +++ b/common/acpi.c @@ -315,7 +315,7 @@ int acpi_ap_to_ec(int is_cmd, uint8_t value, uint8_t *resultptr) break; #endif #ifdef CONFIG_KEYBOARD_BACKLIGHT - case EC_ACPI_MEM_KEYBOARD_BACKLIGHT: + case EC_ACPI_MEM_KEYBOARD_BACKLIGHT: { char ts_str[PRINTF_TIMESTAMP_BUF_SIZE]; /* * Debug output with CR not newline, because the host @@ -327,6 +327,7 @@ int acpi_ap_to_ec(int is_cmd, uint8_t value, uint8_t *resultptr) kblight_set(data); kblight_enable(data > 0); break; + } #endif #ifdef CONFIG_FANS case EC_ACPI_MEM_FAN_DUTY: |