diff options
author | Ben Elliston <bje@au.ibm.com> | 2009-11-26 10:06:35 +0000 |
---|---|---|
committer | Ben Elliston <bje@gcc.gnu.org> | 2009-11-26 21:06:35 +1100 |
commit | 5d6b1baca04732559753fbd217aaf40b0463c4a0 (patch) | |
tree | bc3cf7383aab37d0c917e64122b3856fede5547a | |
parent | 0fac51514326c7e8b04d88d22a4ab717bd15d46b (diff) | |
download | gcc-5d6b1baca04732559753fbd217aaf40b0463c4a0.zip gcc-5d6b1baca04732559753fbd217aaf40b0463c4a0.tar.gz gcc-5d6b1baca04732559753fbd217aaf40b0463c4a0.tar.bz2 |
posix-threads.cc (ParkHelper::unpark): Do not initialise result, but assign it instead.
* 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.
From-SVN: r154670
-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 8d7ddc8..bf48430 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 a26c3bd..66693ab 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); } |