cancel
Showing results for 
Search instead for 
Did you mean: 

Extra parentheses in HAL_DACEx_ClearConfigAutonomousMode() (in stm32u5xx_hal_dac_ex.c)

JVERN.18
Associate III

image.png

In HAL_DACEx_ClearConfigAutonomousMode(), a test is surrounded by parentheses that are clearly unnecessary in code generated by STM32CubeMx.
This is not very important... but it generates warnings that I check at each compilation...

2 REPLIES 2

Please see the community guidelines for how to properly post source code - not as screenshots:

How to write your question to maximize your chances to find a solution

How to insert source code

 


@JVERN.18 wrote:

 it generates warnings .


What warnings, exactly?

And what build tools & version are you using?

Sorry for the scrrenshots, I'll be more careful next time...

The compiler is LLVM/Clang and the warning is "equality comparison whith extraneous parentheses [-Wparentheses-equality]"

This is not a very important warning, and I see that GNU does not see a problem... but it would still be bette if the extra parentheses were not there...