Bug 411045, Warning: unused variable 'me' in PR_EnumerateThreads
authorkaie%kuix.de
Tue, 08 Jan 2008 15:36:37 +0000
changeset 3902 5cfe0303add66c195498143589b1c5282ccb8fec
parent 3900 8c6449bc4cbf49445d4d74fde872f0cfa658f6e0
child 3903 6258564f0d7c4ba99e0450967a22c50030efd269
push idunknown
push userunknown
push dateunknown
bugs411045
Bug 411045, Warning: unused variable 'me' in PR_EnumerateThreads Patch contributed by Jesse Ruderman r=wtc
pr/src/pthreads/ptthread.c
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -1203,17 +1203,22 @@ static PRBool suspendAllOn = PR_FALSE;
 
 static PRBool suspendAllSuspended = PR_FALSE;
 
 PR_IMPLEMENT(PRStatus) PR_EnumerateThreads(PREnumerator func, void *arg)
 {
     PRIntn count = 0;
     PRStatus rv = PR_SUCCESS;
     PRThread* thred = pt_book.first;
+
+#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
+#if !defined(_PR_DCETHREADS)
     PRThread *me = PR_GetCurrentThread();
+#endif
+#endif
 
     PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, ("Begin PR_EnumerateThreads\n"));
     /*
      * $$$
      * Need to suspend all threads other than me before doing this.
      * This is really a gross and disgusting thing to do. The only
      * good thing is that since all other threads are suspended, holding
      * the lock during a callback seems like child's play.