diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-26 10:06:35 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-11-26 10:06:35 +0000 |
commit | 0dd13e3460e9ba0e47a1904937af2e35655506c1 (patch) | |
tree | bc3cf7383aab37d0c917e64122b3856fede5547a | |
parent | e2b814033a963d7d9ca00933279cd15839b473b9 (diff) | |
download | gcc-0dd13e3460e9ba0e47a1904937af2e35655506c1.tar.gz |
* posix-threads.cc (ParkHelper::unpark): Do not initialise result,
but assign it instead. Eliminates an unused variable warning when
the result == 0 assertion is disabled.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154670 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | libjava/ChangeLog | 6 | ||||
-rw-r--r-- | libjava/posix-threads.cc | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 8d7ddc867b4..bf48430e7e9 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2009-11-26 Ben Elliston <bje@au.ibm.com> + + * posix-threads.cc (ParkHelper::unpark): Do not initialise result, + but assign it instead. Eliminates an unused variable warning when + the result == 0 assertion is disabled. + 2009-11-17 Andrew Haley <aph@redhat.com> * posix-threads.cc (park): Rewrite code to handle time. diff --git a/libjava/posix-threads.cc b/libjava/posix-threads.cc index a26c3bd336e..66693abbc9b 100644 --- a/libjava/posix-threads.cc +++ b/libjava/posix-threads.cc @@ -365,8 +365,9 @@ ParkHelper::unpark () if (compare_and_swap (ptr, Thread::THREAD_PARK_PARKED, Thread::THREAD_PARK_RUNNING)) { + int result; pthread_mutex_lock (&mutex); - int result = pthread_cond_signal (&cond); + result = pthread_cond_signal (&cond); pthread_mutex_unlock (&mutex); JvAssert (result == 0); } |