Skip to content
Permalink
Browse files

logging: Fix checks of Kconfig option

The compiler was generating errors of the form
error: "CONFIG_LOG" is not defined, evaluates to 0 [-Werror=undef]
when -Wundef is used and the config option was turned off.  Change
check to ifdef/ifndef.

Signed-off-by: Bradley Bolen <bbolen@lexmark.com>
  • Loading branch information...
Bradley Bolen authored and andrewboie committed May 13, 2019
1 parent 3c0c1bf commit 63e784ca8cb4adb0533e4d646a9cc6424f799138
Showing with 2 additions and 2 deletions.
  1. +2 −2 include/logging/log_core.h
@@ -20,7 +20,7 @@ extern "C" {
#error "Logger does not support 64 bit architecture."
#endif

#if !CONFIG_LOG
#ifndef CONFIG_LOG
#define CONFIG_LOG_DEFAULT_LEVEL 0
#define CONFIG_LOG_DOMAIN_ID 0
#define CONFIG_LOG_MAX_LEVEL 0
@@ -330,7 +330,7 @@ extern "C" {

#define LOG_FILTER_FIRST_BACKEND_SLOT_IDX 1

#if CONFIG_LOG_RUNTIME_FILTERING
#ifdef CONFIG_LOG_RUNTIME_FILTERING
#define LOG_RUNTIME_FILTER(_filter) \
LOG_FILTER_SLOT_GET(&(_filter)->filters, LOG_FILTER_AGGR_SLOT_IDX)
#else

0 comments on commit 63e784c

Please sign in to comment.
You can’t perform that action at this time.