PATCH, libjava: eliminate warning

Ben Elliston <[email protected]>
Newsgroups gmane.comp.gcc.patches,gmane.comp.gcc.java.devel
Message-ID <1259213142.25791.1.camel@bapbop>
This warning was introduced by Andrew's Nov 17 patch.
Okay for mainline?

Ben

2009-11-26  Ben Elliston  <[email protected]>

	* 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.

Index: posix-threads.cc
===================================================================
--- posix-threads.cc	(revision 154668)
+++ posix-threads.cc	(working copy)
@@ -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);
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.