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 }