2016-03-24 12:33 PM
Hi,
When compiling my project raises some compiler warnings. I use a makefile to compile with the following settings: WARNINGS_FLAGS = -Wall WARNINGS_FLAGS += -Wextra WARNINGS_FLAGS += -Wfloat-equal WARNINGS_FLAGS += -Wlogical-op WARNINGS_FLAGS += -Wundef WARNINGS_FLAGS += -Wwrite-strings ♯ ♯ -Wall WARNINGS_FLAGS += -Wno-sign-compare Follows the compiler output warnings: stm32f100(v 1.3.1): Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_pwr.c:435:38: warning: unused parameter 'Regulator' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.c:1066:96: warning: unused parameter 'Alarm' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc.c:1108:77: warning: unused parameter 'Alarm' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2070:76: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2103:75: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2136:79: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_tim.c:2175:78: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c:193:80: warning: unused parameter 'Tamper' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c:486:45: warning: unused parameter 'hrtc' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c:508:48: warning: unused parameter 'hrtc' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c:535:78: warning: unused parameter 'SmoothCalibPeriod' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rtc_ex.c:535:106: warning: unused parameter 'SmoothCalibPlusPulses' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_flash_ex.c:612:38: warning: unused parameter 'Banks' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:709:88: warning: unused parameter 'FLatency' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:975:33: warning: unused parameter 'RCC_MCOx' [-Wunused-parameter] Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:975:76: warning: unused parameter 'RCC_MCODiv' [-Wunused-parameter] stm32f427 (v 1.11.0): Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c:2107:76: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c:2141:75: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c:2175:79: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c:2215:78: warning: unused parameter 'OutputChannel' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c:2084:77: warning: unused parameter 'DevAddress' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_can.c:359:59: warning: unused parameter 'hcan' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_adc_ex.c:757:57: warning: unused parameter 'hadc' [-Wunused-parameter] Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c:383:38: warning: unused parameter 'Regulator' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c:476:40: warning: unused parameter 'cfgidx' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c:564:42: warning: unused parameter 'cfgidx' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Src/usbd_cdc.c:664:68: warning: unused parameter 'epnum' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_ctlreq.c:717:51: warning: unused parameter 'req' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:213:60: warning: unused parameter 'pdev' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:509:65: warning: unused parameter 'pdev' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:509:79: warning: unused parameter 'epnum' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:520:66: warning: unused parameter 'pdev' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:520:80: warning: unused parameter 'epnum' [-Wunused-parameter] Middlewares/ST/STM32_USB_Device_Library/Core/Src/usbd_core.c:531:62: warning: unused parameter 'pdev' [-Wunused-parameter] Middlewares/Third_Party/FatFs/src/ff_gen_drv.c:90:50: warning: unused parameter 'lun' [-Wunused-parameter] Middlewares/Third_Party/FatFs/src/drivers/sd_diskio.c:73:28: warning: unused parameter 'lun' [-Wunused-parameter] Middlewares/Third_Party/FatFs/src/drivers/sd_diskio.c:91:24: warning: unused parameter 'lun' [-Wunused-parameter] Middlewares/Third_Party/FatFs/src/drivers/sd_diskio.c:111:22: warning: unused parameter 'lun' [-Wunused-parameter] Middlewares/Third_Party/FatFs/src/drivers/sd_diskio.c:135:23: warning: unused parameter 'lun' [-Wunused-parameter] Middlewares/Third_Party/FatFs/src/drivers/sd_diskio.c:158:23: warning: unused parameter 'lun' [-Wunused-parameter] Src/usbd_desc.c:218:56: warning: unused parameter 'speed' [-Wunused-parameter] Src/usbd_desc.c:231:59: warning: unused parameter 'speed' [-Wunused-parameter] Src/usbd_desc.c:264:65: warning: unused parameter 'speed' [-Wunused-parameter] Src/usbd_cdc_if.c:186:69: warning: unused parameter 'length' [-Wunused-parameter] Src/usbd_desc.c:63:36: warning: passing argument 1 of 'USBD_GetString' discards 'const' qualifier from pointer target type Src/usbd_desc.c:61:38: warning: passing argument 1 of 'USBD_GetString' discards 'const' qualifier from pointer target type Src/usbd_desc.c:65:42: warning: passing argument 1 of 'USBD_GetString' discards 'const' qualifier from pointer target type Src/usbd_desc.c:66:38: warning: passing argument 1 of 'USBD_GetString' discards 'const' qualifier from pointer target type Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c:320:10: warning: cast from function call of type 'uint32_t' to non-matching type 'struct DMA_Base_Registers *' [-Wbad-function-cast] #stm32f1 #hal #stm32f4 #stcubemx2016-03-24 12:41 PM
What You expect from cube?
2016-03-24 01:13 PM
I expect that over time reduce errors, the code has a minimum of warnings.
2016-03-24 01:19 PM
So wait ;). This warning are not important, and solution for them is qiute strange.
You wanna good code. write it by youself.2016-03-25 08:19 AM
Why ST does not put the source code hal and cube on github?
Therefore notifications of problems and the suggestion of bug fixes would be made directly on github and this forum would be used to remove doubts and generaldiscussions.