Skip to content

Commit 97eaed7

Browse files
committed
STM32F3: Eliminate two unused variable warnings
1 parent 4f9bdf5 commit 97eaed7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

targets/TARGET_STM/TARGET_STM32F3/serial_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ static void uart_irq(int id)
292292
if (__HAL_UART_GET_IT_SOURCE(huart, UART_IT_RXNE) != RESET) {
293293
irq_handler(serial_irq_ids[id], RxIrq);
294294
volatile uint32_t tmpval = huart->Instance->RDR; // Clear RXNE flag
295+
UNUSED(tmpval);
295296
}
296297
}
297298
if (__HAL_UART_GET_FLAG(huart, UART_FLAG_ORE) != RESET) {
@@ -875,6 +876,7 @@ void serial_rx_abort_asynch(serial_t *obj)
875876
// clear flags
876877
__HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_PEF | UART_CLEAR_FEF | UART_CLEAR_OREF);
877878
volatile uint32_t tmpval = huart->Instance->RDR; // Clear RXNE flag
879+
UNUSED(tmpval);
878880

879881
// reset states
880882
huart->RxXferCount = 0;

0 commit comments

Comments
 (0)