From 808cc7c4366ca8a53292494fd1202e09a3235d7d Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Thu, 21 Mar 2019 15:55:31 +0100 Subject: [PATCH] logging: Fix LOG_LEVEL_SET() not compiling when log disabled When log is disabled then input parameter to LOG_LEVEL_SET(level) is not defined. It was still used, leading to compilation failure. Signed-off-by: Krzysztof Chruscinski --- include/logging/log.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/logging/log.h b/include/logging/log.h index 6a05af9ae1b..e5a38a4164c 100644 --- a/include/logging/log.h +++ b/include/logging/log.h @@ -415,7 +415,8 @@ char *log_strdup(const char *str); * */ #define LOG_LEVEL_SET(level) \ - static const u32_t __log_level __attribute__((unused)) = level + static const u32_t __log_level __attribute__((unused)) = \ + _LOG_LEVEL_RESOLVE(level) /** * @}