shell: Fix llvm-clang coverage without backend.
Building this file with CONFIG_COVERAGE=y and CONFIG_SHELL_LOG_BACKEND=n fails on the llvm-clang compiler. Swapping the IS_ENABLED and log_backend allows the compiler to optimize out the if block even with coverage enabled. Signed-off-by: Jeremy Bettis <jbettis@chromium.org>
This commit is contained in:
parent
62e5db70ef
commit
d4316cc483
1 changed files with 1 additions and 1 deletions
|
@ -1249,7 +1249,7 @@ void shell_thread(void *shell_handle, void *arg_log_backend,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (log_backend && IS_ENABLED(CONFIG_SHELL_LOG_BACKEND)) {
|
if (IS_ENABLED(CONFIG_SHELL_LOG_BACKEND) && log_backend) {
|
||||||
z_shell_log_backend_enable(shell->log_backend, (void *)shell,
|
z_shell_log_backend_enable(shell->log_backend, (void *)shell,
|
||||||
log_level);
|
log_level);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue