[libdispatch-dev] [PATCH] Quiet the warning of unused return value
jocke at tbricks.com
Sat May 28 05:28:57 PDT 2011
I get a warning as the return value is not checked from dispatch_atomic_cmpxchg() - as it is in all other 11 usages of it.
Attached is a patch that just discards the return value accordingly to quiet this warning.
--- src/queue.c (revision 197)
+++ src/queue.c (working copy)
@@ -377,7 +377,7 @@
// The first xchg on the tail will tell the enqueueing thread that it
// is safe to blindly write out to the head pointer. A cmpxchg honors
// the algorithm.
- dispatch_atomic_cmpxchg(&dq->dq_items_head, mediator, NULL);
+ (void) dispatch_atomic_cmpxchg(&dq->dq_items_head, mediator, NULL);
_dispatch_debug("no work on global work queue");
More information about the libdispatch-dev