From: Bart Van Assche Date: Wed, 12 Aug 2009 13:30:55 +0000 (+0000) Subject: Fixed compiler warnings triggered by annotate_rwlock.c X-Git-Tag: svn/VALGRIND_3_5_0~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2236b87798b0b8f50eaad5f195783fa85c1e78b6;p=thirdparty%2Fvalgrind.git Fixed compiler warnings triggered by annotate_rwlock.c git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10795 --- diff --git a/drd/tests/annotate_rwlock.c b/drd/tests/annotate_rwlock.c index 952ed21e2e..bc290eeb5d 100644 --- a/drd/tests/annotate_rwlock.c +++ b/drd/tests/annotate_rwlock.c @@ -66,13 +66,13 @@ static void rwlock_rdlock(rwlock_t* p) #else pthread_yield(); #endif - __sync_fetch_and_sub(&p->locked, 1); + (void) __sync_fetch_and_sub(&p->locked, 1); } p->reader_count++; assert(p->reader_count >= 0); assert(p->writer_count >= 0); assert(p->reader_count == 0 || p->writer_count == 0); - __sync_fetch_and_sub(&p->locked, 1); + (void) __sync_fetch_and_sub(&p->locked, 1); ANNOTATE_READERLOCK_ACQUIRED(p); } @@ -90,13 +90,13 @@ static void rwlock_wrlock(rwlock_t* p) #else pthread_yield(); #endif - __sync_fetch_and_sub(&p->locked, 1); + (void) __sync_fetch_and_sub(&p->locked, 1); } p->writer_count++; assert(p->reader_count >= 0); assert(p->writer_count >= 0); assert(p->reader_count == 0 || p->writer_count == 0); - __sync_fetch_and_sub(&p->locked, 1); + (void) __sync_fetch_and_sub(&p->locked, 1); ANNOTATE_WRITERLOCK_ACQUIRED(p); } @@ -117,7 +117,7 @@ static void rwlock_unlock(rwlock_t* p) assert(p->reader_count >= 0); assert(p->writer_count >= 0); assert(p->reader_count == 0 || p->writer_count == 0); - __sync_fetch_and_sub(&p->locked, 1); + (void) __sync_fetch_and_sub(&p->locked, 1); } static void* thread_func(void* arg)