(libretro-common) message_queue.c - cleanups

This commit is contained in:
twinaphex 2016-04-08 02:59:06 +02:00
parent 8ba1f2fca6
commit 8e2dada12a

View File

@ -175,12 +175,9 @@ void msg_queue_clear(msg_queue_t *queue)
**/
const char *msg_queue_pull(msg_queue_t *queue)
{
struct queue_elem *front = NULL, *last = NULL,
*parent = NULL, *child = NULL;
struct queue_elem *front = NULL, *last = NULL;
size_t tmp_ptr = 1;
(void)parent;
(void)child;
(void)tmp_ptr;
/* Nothing in queue. */
@ -203,6 +200,8 @@ const char *msg_queue_pull(msg_queue_t *queue)
for (;;)
{
struct queue_elem *parent = NULL;
struct queue_elem *child = NULL;
size_t switch_index = tmp_ptr;
bool left = (tmp_ptr * 2 <= queue->ptr)
&& (queue->elems[tmp_ptr] < queue->elems[tmp_ptr * 2]);