-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extraneous parentheses #13
Comments
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. ( ((__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))
The text was updated successfully, but these errors were encountered: