Commit 9840dbd3 authored by David Gibson's avatar David Gibson

aga: Annotate unused return values

bfs_dequeue() and dfs_pop() discard the return values of lqueue_dequeue()
and lstack_pop() respectively.  This is correct, but causes warnings in
some compiler configurations (including the one currently used by
travis-ci.org).

Use the cast-to-void idiom to tell the compiler this is intentional.
Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
parent 1eadb3a0
...@@ -32,7 +32,7 @@ static struct aga_node *bfs_front(bfs_queue *queue) ...@@ -32,7 +32,7 @@ static struct aga_node *bfs_front(bfs_queue *queue)
static void bfs_dequeue(bfs_queue *queue) static void bfs_dequeue(bfs_queue *queue)
{ {
lqueue_dequeue(queue); (void) lqueue_dequeue(queue);
} }
int aga_bfs_start(struct aga_graph *g) int aga_bfs_start(struct aga_graph *g)
......
...@@ -27,7 +27,7 @@ static bool dfs_push(struct aga_graph *g, dfs_stack *stack, ...@@ -27,7 +27,7 @@ static bool dfs_push(struct aga_graph *g, dfs_stack *stack,
static void dfs_pop(dfs_stack *stack) static void dfs_pop(dfs_stack *stack)
{ {
lstack_pop(stack); (void) lstack_pop(stack);
} }
static struct aga_node *dfs_top(dfs_stack *stack) static struct aga_node *dfs_top(dfs_stack *stack)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment