From d829c03656fb67b5235e7e0c08ec84b8938832f2 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 5 Dec 2016 17:24:25 -0600 Subject: [PATCH] Corrects some warnings and link problems introduced in the last big commits. --- configs/bambino-200e/src/lpc43_appinit.c | 2 +- configs/mikroe-stm32f4/src/stm32_pwm.c | 7 ++++--- configs/stm32f103-minimum/src/stm32_pwm.c | 7 ++++--- configs/stm32f3discovery/src/stm32_pwm.c | 7 ++++--- configs/stm32f4discovery/src/stm32_pwm.c | 8 ++++---- configs/stm32ldiscovery/src/stm32_pwm.c | 7 ++++--- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/configs/bambino-200e/src/lpc43_appinit.c b/configs/bambino-200e/src/lpc43_appinit.c index f69023a4fe..785c28758b 100644 --- a/configs/bambino-200e/src/lpc43_appinit.c +++ b/configs/bambino-200e/src/lpc43_appinit.c @@ -164,7 +164,7 @@ int board_app_initialize(uintptr_t arg) { /* Initialize the SPIFI block device */ - nsh_spifi_initialize(); + (void)nsh_spifi_initialize(); #ifdef CONFIG_TIMER /* Registers the timers */ diff --git a/configs/mikroe-stm32f4/src/stm32_pwm.c b/configs/mikroe-stm32f4/src/stm32_pwm.c index a4bb122a45..bad3819dd0 100644 --- a/configs/mikroe-stm32f4/src/stm32_pwm.c +++ b/configs/mikroe-stm32f4/src/stm32_pwm.c @@ -85,8 +85,6 @@ # undef HAVE_PWM #endif -#ifdef HAVE_PWM - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -101,6 +99,7 @@ int stm32_pwm_setup(void) { +#ifdef HAVE_PWM static bool initialized = false; struct pwm_lowerhalf_s *pwm; int ret; @@ -133,6 +132,8 @@ int stm32_pwm_setup(void) } return OK; +#else + return -ENOSYS; +#endif } -#endif /* HAVE_PWM */ diff --git a/configs/stm32f103-minimum/src/stm32_pwm.c b/configs/stm32f103-minimum/src/stm32_pwm.c index c3e64baf7b..8f7e99f839 100644 --- a/configs/stm32f103-minimum/src/stm32_pwm.c +++ b/configs/stm32f103-minimum/src/stm32_pwm.c @@ -85,8 +85,6 @@ # undef HAVE_PWM #endif -#ifdef HAVE_PWM - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -101,6 +99,7 @@ int stm32_pwm_setup(void) { +#ifdef HAVE_PWM static bool initialized = false; struct pwm_lowerhalf_s *pwm; int ret; @@ -133,6 +132,8 @@ int stm32_pwm_setup(void) } return OK; +#else + return -ENOSYS; +#endif } -#endif /* HAVE_PWM */ diff --git a/configs/stm32f3discovery/src/stm32_pwm.c b/configs/stm32f3discovery/src/stm32_pwm.c index e31a2e62fc..5eb075c51d 100644 --- a/configs/stm32f3discovery/src/stm32_pwm.c +++ b/configs/stm32f3discovery/src/stm32_pwm.c @@ -85,8 +85,6 @@ # undef HAVE_PWM #endif -#ifdef HAVE_PWM - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -101,6 +99,7 @@ int stm32_pwm_setup(void) { +#ifdef HAVE_PWM static bool initialized = false; struct pwm_lowerhalf_s *pwm; int ret; @@ -133,6 +132,8 @@ int stm32_pwm_setup(void) } return OK; +#else + return -ENOSYS; +#endif } -#endif /* HAVE_PWM */ diff --git a/configs/stm32f4discovery/src/stm32_pwm.c b/configs/stm32f4discovery/src/stm32_pwm.c index e8565b8fd0..0eaefc9371 100644 --- a/configs/stm32f4discovery/src/stm32_pwm.c +++ b/configs/stm32f4discovery/src/stm32_pwm.c @@ -83,8 +83,6 @@ # undef HAVE_PWM #endif -#ifdef HAVE_PWM - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -99,6 +97,7 @@ int stm32_pwm_setup(void) { +#ifdef HAVE_PWM static bool initialized = false; struct pwm_lowerhalf_s *pwm; int ret; @@ -131,6 +130,7 @@ int stm32_pwm_setup(void) } return OK; +#else + return -ENOSYS; +#endif } - -#endif /* HAVE_PWM */ diff --git a/configs/stm32ldiscovery/src/stm32_pwm.c b/configs/stm32ldiscovery/src/stm32_pwm.c index 6e2753cf9d..3409fccc8e 100644 --- a/configs/stm32ldiscovery/src/stm32_pwm.c +++ b/configs/stm32ldiscovery/src/stm32_pwm.c @@ -85,8 +85,6 @@ # undef HAVE_PWM #endif -#ifdef HAVE_PWM - /************************************************************************************ * Public Functions ************************************************************************************/ @@ -101,6 +99,7 @@ int stm32_pwm_setup(void) { +#ifdef HAVE_PWM static bool initialized = false; struct pwm_lowerhalf_s *pwm; int ret; @@ -133,6 +132,8 @@ int stm32_pwm_setup(void) } return OK; +#else + return -ENOSYS; +#endif } -#endif /* HAVE_PWM */