Skip to main content
Associate III
January 16, 2025
Solved

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

  • January 16, 2025
  • 2 replies
  • 1308 views

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...

This topic has been closed for replies.
Best answer by JVERN.18

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...

2 replies

Andrew Neil
Super User
January 16, 2025

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?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
JVERN.18AuthorBest answer
Associate III
January 16, 2025

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...