From 49d8e647e391d6c2a05f9e364b200c7c10e93dc1 Mon Sep 17 00:00:00 2001 From: Joakim Gebart Date: Sat, 4 Jul 2015 11:23:48 +0200 Subject: [PATCH] boards/wsn430-common/wsn430-uart0: Fix warning about unused variable --- boards/wsn430-common/wsn430-uart0.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/boards/wsn430-common/wsn430-uart0.c b/boards/wsn430-common/wsn430-uart0.c index 9a82348ad2..7161d431dc 100644 --- a/boards/wsn430-common/wsn430-uart0.c +++ b/boards/wsn430-common/wsn430-uart0.c @@ -35,7 +35,7 @@ void usart0irq(void); * \brief the interrupt function */ interrupt(USART0RX_VECTOR) usart0irq(void) { - int dummy = 0; + volatile int dummy = 0; /* Check status register for receive errors. */ if(U0RCTL & RXERR) { if (U0RCTL & FE) { @@ -52,12 +52,13 @@ interrupt(USART0RX_VECTOR) usart0irq(void) { } /* Clear error flags by forcing a dummy read. */ dummy = U0RXBUF; + (void)dummy; } #ifdef MODULE_UART0 else if (uart0_handler_pid != KERNEL_PID_UNDEF) { - dummy = U0RXBUF; - uart0_handle_incoming(dummy); - uart0_notify_thread(); - } + dummy = U0RXBUF; + uart0_handle_incoming(dummy); + uart0_notify_thread(); + } #endif }