diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index a9565a76a0e..3de146ae411 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -3649,6 +3649,7 @@ static uint32_t adc_sqrbits(FAR struct stm32_dev_s *priv, int first, int last, * Name: adc_offset_set ****************************************************************************/ +#ifdef CONFIG_STM32_ADC_LL_OPS #ifdef HAVE_IP_ADC_V2 static int adc_offset_set(FAR struct stm32_adc_dev_s *dev, uint8_t ch, uint8_t i, uint16_t offset) @@ -3705,6 +3706,7 @@ errout: return ret; } #endif +#endif /* CONFIG_STM32_ADC_LL_OPS */ /**************************************************************************** * Name: adc_set_ch diff --git a/binfmt/binfmt_execmodule.c b/binfmt/binfmt_execmodule.c index ae6e12dccc2..9f0167fea5b 100644 --- a/binfmt/binfmt_execmodule.c +++ b/binfmt/binfmt_execmodule.c @@ -48,7 +48,6 @@ #include #include -#include #include #include diff --git a/binfmt/libelf/libelf_load.c b/binfmt/libelf/libelf_load.c index 661186e7526..7b4dbae0bab 100644 --- a/binfmt/libelf/libelf_load.c +++ b/binfmt/libelf/libelf_load.c @@ -49,7 +49,9 @@ #include #include +#include #include +#include #include #include "libelf.h" @@ -302,10 +304,12 @@ int elf_load(FAR struct elf_loadinfo_s *loadinfo) goto errout_with_buffers; } +#ifdef CONFIG_BUILD_KERNEL /* Initialize the user heap */ umm_initialize((FAR void *)CONFIG_ARCH_HEAP_VBASE, up_addrenv_heapsize(&loadinfo->addrenv)); +#endif #endif /* Load ELF section data into memory */ diff --git a/sched/sched/sched_note.c b/sched/sched/sched_note.c index 40470b6561f..e98bc9dd445 100644 --- a/sched/sched/sched_note.c +++ b/sched/sched/sched_note.c @@ -216,6 +216,7 @@ void note_spincommon(FAR struct tcb_s *tcb, FAR volatile spinlock_t *spinlock, * ****************************************************************************/ +#if defined(CONFIG_SCHED_NOTE_GET) || defined(CONFIG_DEBUG_ASSERTIONS) static unsigned int note_length(void) { unsigned int head = g_note_info.ni_head; @@ -228,6 +229,7 @@ static unsigned int note_length(void) return head - tail; } +#endif /**************************************************************************** * Name: note_remove diff --git a/sched/signal/sig_notification.c b/sched/signal/sig_notification.c index 5cb6fc62ed6..fa3edb76d9d 100644 --- a/sched/signal/sig_notification.c +++ b/sched/signal/sig_notification.c @@ -47,6 +47,8 @@ #include #include +#include + #include "sched/sched.h" #include "signal/signal.h"