From 9840dbd3e19eaee1ed82a445cd5e9f041a434f70 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Wed, 27 Jan 2016 23:11:31 +1100 Subject: [PATCH] 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: David Gibson --- ccan/aga/bfs.c | 2 +- ccan/aga/dfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ccan/aga/bfs.c b/ccan/aga/bfs.c index 64fdd485..b4113608 100644 --- a/ccan/aga/bfs.c +++ b/ccan/aga/bfs.c @@ -32,7 +32,7 @@ static struct aga_node *bfs_front(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) diff --git a/ccan/aga/dfs.c b/ccan/aga/dfs.c index 5f836ec3..b8714686 100644 --- a/ccan/aga/dfs.c +++ b/ccan/aga/dfs.c @@ -27,7 +27,7 @@ static bool dfs_push(struct aga_graph *g, 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) -- 2.39.2