Closed RetoFx closed 3 months ago
See also stm32f1xx_hal_driver#13
Hello @RetoFx,
Thank you for your contribution. As indicated in the STM32CubeF2 firmware release note, only template projects have been migrated to Arm Compiler 6 with MDK-ARM 5.31 using the “AC-like Warnings” mode. The warnings you've referenced do not fall under the category of "AC5-like warnings." As a result, we are unable to proceed with your change request.
We appreciate your understanding. Please allow me to close this issue.
With regards,
It did not understand why you can't improve the code.
there are extraneous parentheses
(( (__IO uint8_t )(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_0 ))
the outer parentheses are double. so either you remove one of them or add inner parentheses as I prefere because it addes clarification.
( ((__IO uint8_t )(OPTCR_BYTE1_ADDRESS)) == ((uint8_t)OB_RDP_LEVEL_0) )
Hi My ARMCLang report in file stm32f2xx_hal_flash_ex.c Line 654 and 658
if(((__IO uint8_t )(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_2)) { readstatus = OB_RDP_LEVEL_2; } else if(((__IO uint8_t )(OPTCR_BYTE1_ADDRESS) == (uint8_t)OB_RDP_LEVEL_0))
stm32f2xx_hal_flash_ex.c(654): warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
stm32f2xx_hal_flash_ex.c(658): warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
Please replace it with
if(((__IO uint8_t )(OPTCR_BYTE1_ADDRESS)) == ((uint8_t)OB_RDP_LEVEL_2)) { readstatus = OB_RDP_LEVEL_2; } else if(((__IO uint8_t )(OPTCR_BYTE1_ADDRESS)) == ((uint8_t)OB_RDP_LEVEL_0))