Skip to content

uart: unused warning #2718

Closed
Closed
@fpistm

Description

@fpistm

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

Activity

added theissue type on Apr 25, 2025
added this to the 2.11.0 milestone on Apr 25, 2025
added a commit that references this issue on Apr 25, 2025
66b0ca2
added a commit that references this issue on Apr 25, 2025
61b4df8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      uart: unused warning · Issue #2718 · stm32duino/Arduino_Core_STM32