From cffef356448acc852c8ed8c6b7b07820a0a3b794 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 11 Jun 2016 18:09:39 -0600 Subject: [PATCH] Eliminate some warnings introduced with DEBUG changes --- arch/arm/src/kl/kl_dumpgpio.c | 14 ++++---------- libc/spawn/lib_psa_dump.c | 2 ++ 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/src/kl/kl_dumpgpio.c b/arch/arm/src/kl/kl_dumpgpio.c index 218b9ae0df..3ae1708a25 100644 --- a/arch/arm/src/kl/kl_dumpgpio.c +++ b/arch/arm/src/kl/kl_dumpgpio.c @@ -55,7 +55,7 @@ ****************************************************************************/ /* Port letters for prettier debug output */ -#ifdef CONFIG_DEBUG_FEATURES +#ifdef CONFIG_DEBUG_ERROR static const char g_portchar[KL_GPIO_NPORTS] = { #if KL_GPIO_NPORTS > 9 @@ -82,15 +82,7 @@ static const char g_portchar[KL_GPIO_NPORTS] = # error "Bad number of GPIOs" #endif }; -#endif - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ +#endif /* CONFIG_DEBUG_ERROR */ /**************************************************************************** * Public Functions @@ -107,6 +99,7 @@ static const char g_portchar[KL_GPIO_NPORTS] = void kl_dumpgpio(gpio_cfgset_t pinset, const char *msg) { +#ifdef CONFIG_DEBUG_ERROR irqstate_t flags; uintptr_t base; int port; @@ -131,6 +124,7 @@ void kl_dumpgpio(gpio_cfgset_t pinset, const char *msg) getreg32(base + KL_GPIO_PDDR_OFFSET)); leave_critical_section(flags); +#endif /* CONFIG_DEBUG_ERROR */ } #endif /* CONFIG_DEBUG_FEATURES */ diff --git a/libc/spawn/lib_psa_dump.c b/libc/spawn/lib_psa_dump.c index f7af91e35b..b4be80293a 100644 --- a/libc/spawn/lib_psa_dump.c +++ b/libc/spawn/lib_psa_dump.c @@ -64,6 +64,7 @@ void posix_spawnattr_dump(posix_spawnattr_t *attr) { +#ifdef CONFIG_DEBUG_ERROR err("attr[%p]:\n", attr); err(" flags: %04x\n", attr->flags); if (attr->flags == 0) @@ -122,6 +123,7 @@ void posix_spawnattr_dump(posix_spawnattr_t *attr) #ifndef CONFIG_DISABLE_SIGNALS err(" sigmask: %08x\n", attr->sigmask); #endif +#endif /* CONFIG_DEBUG_ERROR */ } #endif /* CONFIG_DEBUG_FEATURES */