diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-09-07 13:47:40 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-07 20:52:17 +0000 |
commit | 244ccd0acb3d5cce60b9efcde7d259b1bc2bcb12 (patch) | |
tree | 32e1dfb693021211f438ff6e815ba247f5df1e77 /zephyr/shim | |
parent | 0a4804280af9c0dd3c29a79827e831943dce0389 (diff) | |
download | chrome-ec-244ccd0acb3d5cce60b9efcde7d259b1bc2bcb12.tar.gz |
zephyr: Change definition of host cmd macro
Use a variable to suppress the unused function warning instead of a
function when CONFIG_PLATFORM_EC_HOSTCMD is undefined, so that it won't
show up in the coverage report as uncovered.
BRANCH=None
BUG=b:245562553
TEST=./twister --coverage && zmake build -a
Change-Id: Iee60823abdf26b67e23b869ad698d9cbcdc307b2
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3879945
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/shim')
-rw-r--r-- | zephyr/shim/include/zephyr_host_command.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/zephyr/shim/include/zephyr_host_command.h b/zephyr/shim/include/zephyr_host_command.h index 614d73b10d..46275288fe 100644 --- a/zephyr/shim/include/zephyr_host_command.h +++ b/zephyr/shim/include/zephyr_host_command.h @@ -40,11 +40,6 @@ bool in_host_command_main(void); * garbage-collect it since it is behind 'if (0)' */ #define DECLARE_HOST_COMMAND(command, routine, version_mask) \ - int __remove_##command(void) \ - { \ - if (0) \ - routine(NULL); \ - return 0; \ - } + int __remove_##command = (0 && (int)(routine)) #endif /* CONFIG_PLATFORM_EC_HOSTCMD */ |