diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-05-09 14:23:34 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-05-09 14:23:34 -0600 |
commit | 17cfb7007f3f4e253d3533ee87349ce1b8e4885e (patch) | |
tree | fb175af19fa6835f8929ee075ff16acfeb49f904 /nuttx/configs | |
parent | 4495dfb36135744a6f903e32ac2215b1f3ab0452 (diff) | |
download | px4-nuttx-17cfb7007f3f4e253d3533ee87349ce1b8e4885e.tar.gz px4-nuttx-17cfb7007f3f4e253d3533ee87349ce1b8e4885e.tar.bz2 px4-nuttx-17cfb7007f3f4e253d3533ee87349ce1b8e4885e.zip |
Various changes and bigfixes for problems detected by CppCheck
Diffstat (limited to 'nuttx/configs')
-rw-r--r-- | nuttx/configs/mikroe-stm32f4/include/board.h | 18 | ||||
-rw-r--r-- | nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h | 3 | ||||
-rw-r--r-- | nuttx/configs/mikroe-stm32f4/src/up_clockconfig.c | 5 | ||||
-rw-r--r-- | nuttx/configs/stm3210e-eval/src/up_can.c | 2 |
4 files changed, 13 insertions, 15 deletions
diff --git a/nuttx/configs/mikroe-stm32f4/include/board.h b/nuttx/configs/mikroe-stm32f4/include/board.h index 513c535da..4ddbe9efc 100644 --- a/nuttx/configs/mikroe-stm32f4/include/board.h +++ b/nuttx/configs/mikroe-stm32f4/include/board.h @@ -256,7 +256,8 @@ #undef EXTERN #if defined(__cplusplus) #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif @@ -274,7 +275,7 @@ extern "C" { * ************************************************************************************/ -EXTERN void stm32_boardinitialize(void); +void stm32_boardinitialize(void); /************************************************************************************ * Name: stm32_ledinit, stm32_setled, and stm32_setleds @@ -287,9 +288,9 @@ EXTERN void stm32_boardinitialize(void); ************************************************************************************/ #ifndef CONFIG_ARCH_LEDS -EXTERN void stm32_ledinit(void); -EXTERN void stm32_setled(int led, bool ledon); -EXTERN void stm32_setleds(uint8_t ledset); +void stm32_ledinit(void); +void stm32_setled(int led, bool ledon); +void stm32_setleds(uint8_t ledset); #endif /************************************************************************************ @@ -316,10 +317,10 @@ EXTERN void stm32_setleds(uint8_t ledset); ************************************************************************************/ #ifdef CONFIG_ARCH_BUTTONS -EXTERN void up_buttoninit(void); -EXTERN uint8_t up_buttons(void); +void up_buttoninit(void); +uint8_t up_buttons(void); #ifdef CONFIG_ARCH_IRQBUTTONS -EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); +xcpt_t up_irqbutton(int id, xcpt_t irqhandler); #endif #endif @@ -327,6 +328,5 @@ EXTERN xcpt_t up_irqbutton(int id, xcpt_t irqhandler); #if defined(__cplusplus) } #endif - #endif /* __ASSEMBLY__ */ #endif /* __CONFIG_MIKROE_STM32F4_INCLUDE_BOARD_H */ diff --git a/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h b/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h index f21229e42..5364d8bd0 100644 --- a/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h +++ b/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h @@ -124,7 +124,6 @@ * * PE10, PMPRD -- Low to read from the LCD * PE11, PMPWR -- Low to write to the LCD - * */ #define GPIO_LCD_RST (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\ @@ -226,7 +225,7 @@ void weak_function stm32_usbinitialize(void); ****************************************************************************************************/ #if defined(CONFIG_STM32_OTGFS) && defined(CONFIG_USBHOST) -#error "The Mikroe-STM32F4 board does not support HOST OTG, only device!" +# error "The Mikroe-STM32F4 board does not support HOST OTG, only device!" #endif /**************************************************************************************************** diff --git a/nuttx/configs/mikroe-stm32f4/src/up_clockconfig.c b/nuttx/configs/mikroe-stm32f4/src/up_clockconfig.c index 807f4d890..9618cf8dd 100644 --- a/nuttx/configs/mikroe-stm32f4/src/up_clockconfig.c +++ b/nuttx/configs/mikroe-stm32f4/src/up_clockconfig.c @@ -124,7 +124,7 @@ void stm32_board_clockconfig(void) /* Wait until the PLL is ready */ while ((getreg32(STM32_RCC_CR) & RCC_CR_PLLRDY) == 0) - ; + ; /* Enable FLASH prefetch, instruction cache, data cache, and 5 wait states */ @@ -145,7 +145,6 @@ void stm32_board_clockconfig(void) /* Wait until the PLL source is used as the system clock source */ while ((getreg32(STM32_RCC_CFGR) & RCC_CFGR_SWS_MASK) != RCC_CFGR_SWS_PLL) - ; - + ; #endif } diff --git a/nuttx/configs/stm3210e-eval/src/up_can.c b/nuttx/configs/stm3210e-eval/src/up_can.c index 7ca712daf..8868c9324 100644 --- a/nuttx/configs/stm3210e-eval/src/up_can.c +++ b/nuttx/configs/stm3210e-eval/src/up_can.c @@ -53,7 +53,7 @@ #include "stm32_can.h" #include "stm3210e-internal.h" -#if defined(CONFIG_CAN) && (defined(CONFIG_STM32_CAN1) +#if defined(CONFIG_CAN) && defined(CONFIG_STM32_CAN1) /************************************************************************************ * Pre-processor Definitions |