# HG changeset patch # User matthewreed # Date 2017-07-19 18:25:09 # Node ID d429d5902330398e0a309c2bbd8cf6b881cb3523 # Parent 57f7cc1705c1e6f980f95d5799c1fc60ff62fae8 Fixed uninitialized variable. diff --git a/src/can_buffer.c b/src/can_buffer.c --- a/src/can_buffer.c +++ b/src/can_buffer.c @@ -20,7 +20,7 @@ CanBufferStatus can_buffer_add(volatile volatile CanRxMsgTypeDef* can_buffer_remove(volatile CanBuffer *buffer) { - volatile CanRxMsgTypeDef* msg; + volatile CanRxMsgTypeDef* msg = NULL; if (buffer->count > 0) { msg = &buffer->data[buffer->tail]; buffer->tail = (buffer->tail + 1) % CAN_BUFFER_SIZE;