]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add parentheses around expressions to avoid warning.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 19 Nov 2009 01:17:26 +0000 (01:17 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 19 Nov 2009 01:17:26 +0000 (01:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@20134 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/tbb/tbb22_20090809oss/src/tbb/task.cpp

index 45743434a35d11ec25949d9f47103c49abd405a2..4815dcd5963b5e177f3ef13fdbe3904823fddfbf 100644 (file)
@@ -1909,7 +1909,7 @@ void Governor::sign_on(GenericScheduler* s) {
 void Governor::sign_off(GenericScheduler* s) {
     if( s->is_registered ) {
 #if __TBB_TASK_SCHEDULER_AUTO_INIT && USE_PTHREAD
-        __TBB_ASSERT( theTLS.get()==s || !s->is_worker() && !theTLS.get(), "attempt to unregister a wrong scheduler instance" );
+      __TBB_ASSERT( theTLS.get()==s || (!s->is_worker() && !theTLS.get()), "attempt to unregister a wrong scheduler instance" );
 #else
         __TBB_ASSERT( theTLS.get()==s, "attempt to unregister a wrong scheduler instance" );
 #endif /* __TBB_TASK_SCHEDULER_AUTO_INIT && USE_PTHREAD */
@@ -2852,7 +2852,9 @@ inline task** GenericScheduler::lock_task_pool( ArenaSlot* victim_arena_slot ) c
         backoff.pause();
     }
     __TBB_ASSERT( victim_task_pool == EmptyTaskPool || 
-                  victim_arena_slot->task_pool == LockedTaskPool && victim_task_pool != LockedTaskPool, 
+                  ((victim_arena_slot->task_pool == LockedTaskPool)
+                  &&
+                  (victim_task_pool != LockedTaskPool)), 
                   "not really locked victim's task pool?" );
     return victim_task_pool;
 } // GenericScheduler::lock_task_pool
@@ -3136,7 +3138,7 @@ inline task* GenericScheduler::get_mailbox_task() {
     task* result = NULL;
     while( task_proxy* t = inbox.pop() ) {
         intptr tat = __TBB_load_with_acquire(t->task_and_tag);
-        __TBB_ASSERT( tat==task_proxy::mailbox_bit || tat==(tat|3)&&tat!=3, NULL );
+        __TBB_ASSERT( tat==task_proxy::mailbox_bit || (tat==(tat|3)&&tat!=3), NULL );
         if( tat!=task_proxy::mailbox_bit && __TBB_CompareAndSwapW( &t->task_and_tag, task_proxy::pool_bit, tat )==tat ) {
             // Successfully grabbed the task, and left pool seeker with job of freeing the proxy.
             ITT_NOTIFY( sync_acquired, inbox.outbox() );

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.