Skip to content

uart: unused warning #2718

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

Closed
fpistm opened this issue Apr 25, 2025 · 0 comments · Fixed by #2719
Closed

uart: unused warning #2718

fpistm opened this issue Apr 25, 2025 · 0 comments · Fixed by #2719
Labels
bug 🐛 Something isn't working
Milestone

Comments

@fpistm
Copy link
Member

fpistm commented Apr 25, 2025

Since #2701, if UART does not support the rx, tx and data invert warnings are raised about unused variables:
Example with STM32F4 target:

.arduino15/packages/STMicroelectronics/hardware/stm32/2.10.1/libraries/SrcWrapper/src/stm32/uart.c: In function 'uart_init':
.arduino15/packages/STMicroelectronics/hardware/stm32/2.10.1/libraries/SrcWrapper/src/stm32/uart.c:118:110: warning: unused parameter 'rx_invert' [-Wunused-parameter]
  118 | bool uart_init(serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t parity, uint32_t stopbits, bool rx_invert, bool tx_invert, bool data_invert)
      |                                                                                                              ^
.arduino15/packages/STMicroelectronics/hardware/stm32/2.10.1/libraries/SrcWrapper/src/stm32/uart.c:118:126: warning: unused parameter 'tx_invert' [-Wunused-parameter]
  118 | bool uart_init(serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t parity, uint32_t stopbits, bool rx_invert, bool tx_invert, bool data_invert)
      |                                                                                                                              ^
.arduino15/packages/STMicroelectronics/hardware/stm32/2.10.1/libraries/SrcWrapper/src/stm32/uart.c:118:142: warning: unused parameter 'data_invert' [-Wunused-parameter]
  118 | bool uart_init(serial_t *obj, uint32_t baudrate, uint32_t databits, uint32_t parity, uint32_t stopbits, bool rx_invert, bool tx_invert, bool data_invert)
      | 
@fpistm fpistm added the bug 🐛 Something isn't working label Apr 25, 2025
@fpistm fpistm added this to the 2.11.0 milestone Apr 25, 2025
fpistm added a commit to fpistm/Arduino_Core_STM32 that referenced this issue Apr 25, 2025
Fixes stm32duino#2718.

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm closed this as completed in 61b4df8 Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

1 participant