Skip to content

Conversation

tpambor
Copy link

@tpambor tpambor commented Oct 7, 2025

Fix warning about extraneous parentheses when compiling with clang.

/home/user/west_workspace/modules/hal/stm32/stm32cube/stm32h5xx/drivers/src/stm32h5xx_hal_rcc_ex.c:3513:26: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]
 3513 |         else if ((srcclk == RCC_USART2CLKSOURCE_PLL3Q))
      |                   ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/west_workspace/modules/hal/stm32/stm32cube/stm32h5xx/drivers/src/stm32h5xx_hal_rcc_ex.c:3513:26: note: remove extraneous parentheses around the comparison to silence this warning
 3513 |         else if ((srcclk == RCC_USART2CLKSOURCE_PLL3Q))
      |                  ~       ^                           ~
/home/user/west_workspace/modules/hal/stm32/stm32cube/stm32h5xx/drivers/src/stm32h5xx_hal_rcc_ex.c:3513:26: note: use '=' to turn this equality comparison into an assignment
 3513 |         else if ((srcclk == RCC_USART2CLKSOURCE_PLL3Q))
      |                          ^~
      |                          =

Related STM32CubeH5 HAL issue: STMicroelectronics/stm32h5xx-hal-driver#14
Related STM32CubeH5 HAL PR: STMicroelectronics/stm32h5xx-hal-driver#15

@tpambor tpambor force-pushed the fix-extraneous-parentheses branch from 2519290 to 2829f35 Compare October 7, 2025 19:26
Fix warning about extraneous parentheses when compiling with clang.

Signed-off-by: Tim Pambor <[email protected]>
Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the README update with the required information. Perfect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants