diff options
| author | hathach <[email protected]> | 2019-09-27 00:15:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-09-27 00:15:43 +0700 |
| commit | 6183dbd0ceefdbff42d30e6691fa9948a695e9af (patch) | |
| tree | ee2660cfb05f002990a16ff69beea96271a09629 /hw | |
| parent | 7ba8e818527eca1c16946ef8f58a0cde807fb3f3 (diff) | |
add -Wextra for more warnings to example
non-stack warning (probably mcu driver) should be suppressed in the
board.mk
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/circuitplayground_bluefruit/board.mk | 5 | ||||
| -rw-r--r-- | hw/bsp/ea4088qs/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/ea4357/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/feather_nrf52840_express/board.mk | 5 | ||||
| -rw-r--r-- | hw/bsp/lpcxpresso11u37/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/lpcxpresso51u68/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/lpcxpresso54114/board.mk | 3 | ||||
| -rw-r--r-- | hw/bsp/lpcxpresso55s69/board.mk | 6 | ||||
| -rw-r--r-- | hw/bsp/mcb1800/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/ngx4330/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/pca10056/board.mk | 5 | ||||
| -rw-r--r-- | hw/bsp/pca10056/pca10056.c | 3 | ||||
| -rw-r--r-- | hw/bsp/pca10059/board.mk | 5 | ||||
| -rw-r--r-- | hw/bsp/stm32f070rbnucleo/board.mk | 3 | ||||
| -rw-r--r-- | hw/bsp/stm32f072disco/board.mk | 3 | ||||
| -rw-r--r-- | hw/bsp/stm32f207nucleo/board.mk | 2 | ||||
| -rw-r--r-- | hw/bsp/stm32f303disco/board.mk | 3 | ||||
| -rw-r--r-- | hw/bsp/stm32f412disco/board.mk | 3 | ||||
| -rw-r--r-- | hw/bsp/stm32f767nucleo/board.mk | 4 | ||||
| -rw-r--r-- | hw/bsp/stm32f767nucleo/stm32f767nucleo.c | 3 | ||||
| -rw-r--r-- | hw/bsp/stm32h743nucleo/board.mk | 3 | ||||
| -rw-r--r-- | hw/bsp/stm32h743nucleo/stm32h743nucleo.c | 2 | ||||
| -rw-r--r-- | hw/bsp/stm32l0538disco/board.mk | 2 |
23 files changed, 60 insertions, 24 deletions
diff --git a/hw/bsp/circuitplayground_bluefruit/board.mk b/hw/bsp/circuitplayground_bluefruit/board.mk index 26b15564d..c1513fe7c 100644 --- a/hw/bsp/circuitplayground_bluefruit/board.mk +++ b/hw/bsp/circuitplayground_bluefruit/board.mk @@ -9,7 +9,10 @@ CFLAGS += \ -DCONFIG_GPIO_AS_PINRESET # nrfx issue undef _ARMCC_VERSION usage https://github.com/NordicSemiconductor/nrfx/issues/49 -CFLAGS += -Wno-error=undef +CFLAGS += -Wno-error=undef -Wno-error=unused-parameter + +# due to tusb_hal_nrf_power_event +CFLAGS += -Wno-error=cast-function-type # All source paths should be relative to the top level. LD_FILE = hw/bsp/circuitplayground_bluefruit/nrf52840_s140_v6.ld diff --git a/hw/bsp/ea4088qs/board.mk b/hw/bsp/ea4088qs/board.mk index 510e2912b..46625ca84 100644 --- a/hw/bsp/ea4088qs/board.mk +++ b/hw/bsp/ea4088qs/board.mk @@ -8,8 +8,8 @@ CFLAGS += \ -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \ -D__USE_LPCOPEN -# lpc_types.h cause following errors -CFLAGS += -Wno-error=strict-prototypes +# mcu driver cause following warnings +CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter MCU_DIR = hw/mcu/nxp/lpc_driver/lpc40xx/lpc_chip_40xx diff --git a/hw/bsp/ea4357/board.mk b/hw/bsp/ea4357/board.mk index 265d9b38b..823481baf 100644 --- a/hw/bsp/ea4357/board.mk +++ b/hw/bsp/ea4357/board.mk @@ -7,8 +7,8 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_LPC43XX \ -D__USE_LPCOPEN -# lpc_types.h cause following errors -CFLAGS += -Wno-error=strict-prototypes +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpc_driver/lpc43xx/lpc_chip_43xx diff --git a/hw/bsp/feather_nrf52840_express/board.mk b/hw/bsp/feather_nrf52840_express/board.mk index 11b5e7bdc..1900bedbb 100644 --- a/hw/bsp/feather_nrf52840_express/board.mk +++ b/hw/bsp/feather_nrf52840_express/board.mk @@ -9,7 +9,10 @@ CFLAGS += \ -DCONFIG_GPIO_AS_PINRESET # nrfx issue undef _ARMCC_VERSION usage https://github.com/NordicSemiconductor/nrfx/issues/49 -CFLAGS += -Wno-error=undef +CFLAGS += -Wno-error=undef -Wno-error=unused-parameter + +# due to tusb_hal_nrf_power_event +CFLAGS += -Wno-error=cast-function-type # All source paths should be relative to the top level. LD_FILE = hw/bsp/feather_nrf52840_express/nrf52840_s140_v6.ld diff --git a/hw/bsp/lpcxpresso11u37/board.mk b/hw/bsp/lpcxpresso11u37/board.mk index 228765550..ced7ceefd 100644 --- a/hw/bsp/lpcxpresso11u37/board.mk +++ b/hw/bsp/lpcxpresso11u37/board.mk @@ -10,8 +10,8 @@ CFLAGS += \ -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data.$$RAM2")))' \ -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' -# startup.c and lpc_types.h cause following errors -CFLAGS += -Wno-error=nested-externs -Wno-error=strict-prototypes +# mcu driver cause following warnings +CFLAGS += -Wno-error=nested-externs -Wno-error=strict-prototypes -Wno-error=unused-parameter MCU_DIR = hw/mcu/nxp/lpc_driver/lpc11uxx/lpc_chip_11uxx diff --git a/hw/bsp/lpcxpresso51u68/board.mk b/hw/bsp/lpcxpresso51u68/board.mk index 5ebda6c39..e5576c3c0 100644 --- a/hw/bsp/lpcxpresso51u68/board.mk +++ b/hw/bsp/lpcxpresso51u68/board.mk @@ -7,8 +7,8 @@ CFLAGS += \ -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \ -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' -# system_LPC51U68.c cause following errors -CFLAGS += -Wno-error=nested-externs +# mcu driver cause following warnings +CFLAGS += -Wno-error=nested-externs -Wno-error=unused-parameter MCU_DIR = hw/mcu/nxp/lpc_driver/lpc51u6x/devices/LPC51U68 diff --git a/hw/bsp/lpcxpresso54114/board.mk b/hw/bsp/lpcxpresso54114/board.mk index 90e864e99..21c8dfd32 100644 --- a/hw/bsp/lpcxpresso54114/board.mk +++ b/hw/bsp/lpcxpresso54114/board.mk @@ -9,6 +9,9 @@ CFLAGS += \ -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \ -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter + MCU_DIR = hw/mcu/nxp/lpc_driver/lpc54xxx/devices/LPC54114 # All source paths should be relative to the top level. diff --git a/hw/bsp/lpcxpresso55s69/board.mk b/hw/bsp/lpcxpresso55s69/board.mk index 2ab7ec51e..6f1afaac1 100644 --- a/hw/bsp/lpcxpresso55s69/board.mk +++ b/hw/bsp/lpcxpresso55s69/board.mk @@ -7,10 +7,10 @@ CFLAGS += \ -DCPU_LPC55S69JBD100_cm33_core0 \ -DCFG_TUSB_MCU=OPT_MCU_LPC55XX \ -DCFG_TUSB_MEM_SECTION='__attribute__((section(".data")))' \ - -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' + -DCFG_TUSB_MEM_ALIGN='__attribute__((aligned(64)))' -# system_LPC55S69_cm33_core0.c cause following errors -CFLAGS += -Wno-error=float-equal -Wno-error=nested-externs +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter -Wno-error=float-equal -Wno-error=nested-externs MCU_DIR = hw/mcu/nxp/lpc_driver/lpc55xx/devices/LPC55S69 diff --git a/hw/bsp/mcb1800/board.mk b/hw/bsp/mcb1800/board.mk index 4a59c043a..3b8ee2968 100644 --- a/hw/bsp/mcb1800/board.mk +++ b/hw/bsp/mcb1800/board.mk @@ -7,8 +7,8 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_LPC18XX \ -D__USE_LPCOPEN -# lpc_types.h cause following errors -CFLAGS += -Wno-error=strict-prototypes +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter -Wno-error=strict-prototypes MCU_DIR = hw/mcu/nxp/lpc_driver/lpc18xx/lpc_chip_18xx diff --git a/hw/bsp/ngx4330/board.mk b/hw/bsp/ngx4330/board.mk index 852c883b0..b82ae9d5c 100644 --- a/hw/bsp/ngx4330/board.mk +++ b/hw/bsp/ngx4330/board.mk @@ -7,8 +7,8 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_LPC43XX \ -D__USE_LPCOPEN -# lpc_types.h cause following errors -CFLAGS += -Wno-error=strict-prototypes +# mcu driver cause following warnings +CFLAGS += -Wno-error=strict-prototypes -Wno-error=unused-parameter MCU_DIR = hw/mcu/nxp/lpc_driver/lpc43xx/lpc_chip_43xx diff --git a/hw/bsp/pca10056/board.mk b/hw/bsp/pca10056/board.mk index 9dbaea426..dc2c434f4 100644 --- a/hw/bsp/pca10056/board.mk +++ b/hw/bsp/pca10056/board.mk @@ -9,7 +9,10 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_NRF5X # nrfx issue undef _ARMCC_VERSION usage https://github.com/NordicSemiconductor/nrfx/issues/49 -CFLAGS += -Wno-error=undef +CFLAGS += -Wno-error=undef -Wno-error=unused-parameter + +# due to tusb_hal_nrf_power_event +CFLAGS += -Wno-error=cast-function-type # All source paths should be relative to the top level. LD_FILE = hw/mcu/nordic/nrfx/mdk/nrf52840_xxaa.ld diff --git a/hw/bsp/pca10056/pca10056.c b/hw/bsp/pca10056/pca10056.c index f575895ec..57426732c 100644 --- a/hw/bsp/pca10056/pca10056.c +++ b/hw/bsp/pca10056/pca10056.c @@ -96,7 +96,8 @@ void board_init(void) nrfx_power_init(&pwr_cfg); // Register tusb function as USB power handler - const nrfx_power_usbevt_config_t config = { .handler = (nrfx_power_usb_event_handler_t) tusb_hal_nrf_power_event }; + // cause cast-function-type warning + const nrfx_power_usbevt_config_t config = { .handler = ((nrfx_power_usb_event_handler_t) tusb_hal_nrf_power_event) }; nrfx_power_usbevt_init(&config); nrfx_power_usbevt_enable(); diff --git a/hw/bsp/pca10059/board.mk b/hw/bsp/pca10059/board.mk index a92592dd1..0ef56ed50 100644 --- a/hw/bsp/pca10059/board.mk +++ b/hw/bsp/pca10059/board.mk @@ -9,7 +9,10 @@ CFLAGS += \ -DCFG_TUSB_MCU=OPT_MCU_NRF5X # nrfx issue undef _ARMCC_VERSION usage https://github.com/NordicSemiconductor/nrfx/issues/49 -CFLAGS += -Wno-error=undef +CFLAGS += -Wno-error=undef -Wno-error=unused-parameter + +# due to tusb_hal_nrf_power_event +CFLAGS += -Wno-error=cast-function-type # All source paths should be relative to the top level. LD_FILE = hw/bsp/$(BOARD)/$(BOARD).ld diff --git a/hw/bsp/stm32f070rbnucleo/board.mk b/hw/bsp/stm32f070rbnucleo/board.mk index 6c5fbe022..42394d1ad 100644 --- a/hw/bsp/stm32f070rbnucleo/board.mk +++ b/hw/bsp/stm32f070rbnucleo/board.mk @@ -9,6 +9,9 @@ CFLAGS += \ -DCFG_EXAMPLE_MSC_READONLY \ -DCFG_TUSB_MCU=OPT_MCU_STM32F0 +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter + ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx diff --git a/hw/bsp/stm32f072disco/board.mk b/hw/bsp/stm32f072disco/board.mk index 0a58a5654..6529763ee 100644 --- a/hw/bsp/stm32f072disco/board.mk +++ b/hw/bsp/stm32f072disco/board.mk @@ -9,6 +9,9 @@ CFLAGS += \ -DCFG_EXAMPLE_MSC_READONLY \ -DCFG_TUSB_MCU=OPT_MCU_STM32F0 +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter + ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx diff --git a/hw/bsp/stm32f207nucleo/board.mk b/hw/bsp/stm32f207nucleo/board.mk index fa7855439..cd2b26204 100644 --- a/hw/bsp/stm32f207nucleo/board.mk +++ b/hw/bsp/stm32f207nucleo/board.mk @@ -8,7 +8,7 @@ CFLAGS += \ -nostdlib -nostartfiles \ -DCFG_TUSB_MCU=OPT_MCU_STM32F2 -# Suppress following warnings/error is required due to STM32F2xx_HAL_Driver. +# mcu driver cause following warnings CFLAGS += -Wno-error=sign-compare ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F2xx_HAL_Driver diff --git a/hw/bsp/stm32f303disco/board.mk b/hw/bsp/stm32f303disco/board.mk index 9efee9092..ab77c55c4 100644 --- a/hw/bsp/stm32f303disco/board.mk +++ b/hw/bsp/stm32f303disco/board.mk @@ -9,6 +9,9 @@ CFLAGS += \ -nostdlib -nostartfiles \ -DCFG_TUSB_MCU=OPT_MCU_STM32F3 +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter + ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F3xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F3xx diff --git a/hw/bsp/stm32f412disco/board.mk b/hw/bsp/stm32f412disco/board.mk index 62f1d4c1e..e059c81d1 100644 --- a/hw/bsp/stm32f412disco/board.mk +++ b/hw/bsp/stm32f412disco/board.mk @@ -9,6 +9,9 @@ CFLAGS += \ -nostdlib -nostartfiles \ -DCFG_TUSB_MCU=OPT_MCU_STM32F4 +# mcu driver cause following warnings +CFLAGS += -Wno-error=maybe-uninitialized + ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F4xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F4xx diff --git a/hw/bsp/stm32f767nucleo/board.mk b/hw/bsp/stm32f767nucleo/board.mk index 3a15e67c7..65690cb2f 100644 --- a/hw/bsp/stm32f767nucleo/board.mk +++ b/hw/bsp/stm32f767nucleo/board.mk @@ -9,8 +9,8 @@ CFLAGS += \ -nostdlib -nostartfiles \ -DCFG_TUSB_MCU=OPT_MCU_STM32F7 -# Suppress following warnings/error is required due to STM32F7xx_HAL_Driver. -CFLAGS += -Wno-error=shadow +# mcu driver cause following warnings +CFLAGS += -Wno-error=shadow ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F7xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F7xx diff --git a/hw/bsp/stm32f767nucleo/stm32f767nucleo.c b/hw/bsp/stm32f767nucleo/stm32f767nucleo.c index 5ac2ddb72..07412fd8e 100644 --- a/hw/bsp/stm32f767nucleo/stm32f767nucleo.c +++ b/hw/bsp/stm32f767nucleo/stm32f767nucleo.c @@ -174,15 +174,16 @@ uint32_t board_button_read(void) int board_uart_read(uint8_t* buf, int len) { + (void) buf; (void) len; return 0; } int board_uart_write(void const * buf, int len) { + (void) buf; (void) len; return 0; } - #if CFG_TUSB_OS == OPT_OS_NONE volatile uint32_t system_ticks = 0; void SysTick_Handler (void) diff --git a/hw/bsp/stm32h743nucleo/board.mk b/hw/bsp/stm32h743nucleo/board.mk index 3d6aae4c4..40b36413f 100644 --- a/hw/bsp/stm32h743nucleo/board.mk +++ b/hw/bsp/stm32h743nucleo/board.mk @@ -9,6 +9,9 @@ CFLAGS += \ -nostdlib -nostartfiles \ -DCFG_TUSB_MCU=OPT_MCU_STM32H7 +# mcu driver cause following warnings +CFLAGS += -Wno-error=maybe-uninitialized + ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32H7xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32H7xx diff --git a/hw/bsp/stm32h743nucleo/stm32h743nucleo.c b/hw/bsp/stm32h743nucleo/stm32h743nucleo.c index 2e02786ee..f7e46a158 100644 --- a/hw/bsp/stm32h743nucleo/stm32h743nucleo.c +++ b/hw/bsp/stm32h743nucleo/stm32h743nucleo.c @@ -197,11 +197,13 @@ uint32_t board_button_read(void) int board_uart_read(uint8_t* buf, int len) { + (void) buf; (void) len; return 0; } int board_uart_write(void const * buf, int len) { + (void) buf; (void) len; return 0; } diff --git a/hw/bsp/stm32l0538disco/board.mk b/hw/bsp/stm32l0538disco/board.mk index 3b84159d1..7e11fa6cd 100644 --- a/hw/bsp/stm32l0538disco/board.mk +++ b/hw/bsp/stm32l0538disco/board.mk @@ -9,6 +9,8 @@ CFLAGS += \ -DCFG_EXAMPLE_MSC_READONLY \ -DCFG_TUSB_MCU=OPT_MCU_STM32L0 +# mcu driver cause following warnings +CFLAGS += -Wno-error=unused-parameter -Wno-error=maybe-uninitialized ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32L0xx_HAL_Driver ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32L0xx |
