From: Mathieu Desnoyers Date: Mon, 21 Mar 2011 21:55:30 +0000 (-0400) Subject: Cleanup: remove unused value warning X-Git-Tag: v0.6.0~49 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=85b577030e0dd244ed2d42aa5196a088e1e64dbb;p=userspace-rcu.git Cleanup: remove unused value warning return value of cmpxchg is purposefully unused in _cds_lfq_enqueue_rcu(). Cast it to (void) to remove the compiler warning. Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/rculfqueue-static.h b/urcu/rculfqueue-static.h index 95294f9..d7c359f 100644 --- a/urcu/rculfqueue-static.h +++ b/urcu/rculfqueue-static.h @@ -86,7 +86,7 @@ void _cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu * * Now move tail (another enqueue might beat * us to it, that's fine). */ - uatomic_cmpxchg(&q->tail, tail, node); + (void) uatomic_cmpxchg(&q->tail, tail, node); rcu_read_unlock(); return; } else { @@ -94,7 +94,7 @@ void _cds_lfq_enqueue_rcu(struct cds_lfq_queue_rcu *q, struct cds_lfq_node_rcu * * Failure to append to current tail. Help moving tail * further and retry. */ - uatomic_cmpxchg(&q->tail, tail, next); + (void) uatomic_cmpxchg(&q->tail, tail, next); rcu_read_unlock(); continue; }