Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56879 - in sandbox/stm/branches/vbe/libs/stm: src test
From: vicente.botet_at_[hidden]
Date: 2009-10-15 15:09:32


Author: viboes
Date: 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
New Revision: 56879
URL: http://svn.boost.org/trac/boost/changeset/56879

Log:
TBoost.STM vbe:
* Warning cleanup
Text files modified:
   sandbox/stm/branches/vbe/libs/stm/src/except_and_back_off_on_abort_notice_cm.cpp | 2
   sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp | 6 ++--
   sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp | 2
   sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp | 2
   sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp | 4 +-
   sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp | 10 +++---
   sandbox/stm/branches/vbe/libs/stm/test/smart.cpp | 6 ++--
   sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.cpp | 14 +++++-----
   sandbox/stm/branches/vbe/libs/stm/test/testHashMapAndLinkedListsWithLocks.cpp | 4 +-
   sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.cpp | 14 +++++-----
   sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h | 56 ++++++++++++++++++++--------------------
   sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.cpp | 10 +++---
   sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h | 4 +-
   sandbox/stm/branches/vbe/libs/stm/test/testRBTree.h | 8 ++--
   sandbox/stm/branches/vbe/libs/stm/test/testatom.cpp | 2
   sandbox/stm/branches/vbe/libs/stm/test/transferFun.cpp | 8 ++--
   sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp | 20 +++++++-------
   sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h | 2
   18 files changed, 87 insertions(+), 87 deletions(-)

Modified: sandbox/stm/branches/vbe/libs/stm/src/except_and_back_off_on_abort_notice_cm.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/src/except_and_back_off_on_abort_notice_cm.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/src/except_and_back_off_on_abort_notice_cm.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -152,7 +152,7 @@
       double abortPriority = 0;
       bool hasLargestReadSet = true;
 
- int mem = lhs.reads() + (lhs.writes() * 10);
+ std::size_t mem = lhs.reads() + (lhs.writes() * 10);
 
       double decrementing = 1.0;
       for (std::list<boost::stm::transaction*>::iterator iter = rhs.begin();

Modified: sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/isolatedComposedIntLockInTx2.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -39,10 +39,10 @@
 static boost::stm::native_trans<int> gInt2;
 #ifndef BOOST_STM_USE_BOOST_MUTEX
 static Mutex lock1 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex lock2 = PTHREAD_MUTEX_INITIALIZER;
+//static Mutex lock2 = PTHREAD_MUTEX_INITIALIZER;
 #else
 static Mutex lock1;
-static Mutex lock2;
+//static Mutex lock2;
 #endif
 ////////////////////////////////////////////////////////////////////////////
 using namespace std; using namespace boost::stm;
@@ -102,7 +102,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static void* Test2(void *threadId)
+void* Test2(void *threadId)
 {
    transaction::initialize_thread();
    int start = *(int*)threadId;

Modified: sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/isolatedIntLockInTx.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -118,7 +118,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static void* TestCount(void *threadId)
+void* TestCount2(void *threadId)
 {
    transaction::initialize_thread();
    int start = *(int*)threadId;

Modified: sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/litExample.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -133,7 +133,7 @@
    }
 }
 
-static void do_work3()
+void do_work3()
 {
    if (work3) return;
    work3 = true;

Modified: sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/lotExample.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -105,7 +105,7 @@
    }
 }
 
-static void do_work3()
+void do_work3bis()
 {
    if (work3) return;
    work3 = true;
@@ -121,7 +121,7 @@
    }
 }
 
-static void do_work4()
+void do_work4()
 {
    if (work4) return;
    work4 = true;

Modified: sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/nestedTxs.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -38,12 +38,12 @@
 static Mutex L = PTHREAD_MUTEX_INITIALIZER;
 static Mutex L2 = PTHREAD_MUTEX_INITIALIZER;
 static Mutex L3 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
+//static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
 #else
 static Mutex L;
 static Mutex L2;
 static Mutex L3;
-static Mutex L4;
+//static Mutex L4;
 #endif
 
 using namespace boost::stm;
@@ -55,7 +55,7 @@
 static void tx_bar();
 static void lk_bar();
 
-static void* tx_foo(void*)
+void* tx_foo(void*)
 {
    transaction::initialize_thread();
    size_t tries = 0;
@@ -83,7 +83,7 @@
 
 
 
-static void* lk_foo(void*)
+void* lk_foo(void*)
 {
    use_lock(&L)
    {
@@ -240,7 +240,7 @@
 void NestedTxTest()
 {
    static std::vector<int> runVector;
- int iterations = 0;
+ //int iterations = 0;
 
    transaction::initialize();
    transaction::initialize_thread();

Modified: sandbox/stm/branches/vbe/libs/stm/test/smart.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/smart.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/smart.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -38,7 +38,7 @@
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
-static void test_parent()
+void test_parent()
 {
    atomic(t)
    {
@@ -124,7 +124,7 @@
 
 //----------------------------------------------------------------------------
 //----------------------------------------------------------------------------
-static void test2()
+void test2()
 {
    atomic(t)
    {
@@ -134,7 +134,7 @@
 
    } end_atom
 
- int y = 0;
+ //int y = 0;
 }
 
 

Modified: sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testHT_latm.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -69,7 +69,7 @@
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -110,7 +110,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -155,7 +155,7 @@
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -195,7 +195,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -238,7 +238,7 @@
 void TestHashTableSetsWithLocks()
 {
    static std::vector<int> runVector;
- int iterations = 0;
+ //int iterations = 0;
 
    usingSingleList = false;
 
@@ -255,7 +255,7 @@
    }
 
    kMainThreadId = kMaxThreads-1;
- int lists = (kMaxThreads / 4) * 3;
+ //int lists = (kMaxThreads / 4) * 3;
 
    for (int k = 0; k < kMaxThreads; ++k)
    {
@@ -264,7 +264,7 @@
       transaction::initialize();
       transaction::initialize_thread();
 
- int index = convertThreadIdToLinkedListIndex(k);
+ //int index = convertThreadIdToLinkedListIndex(k);
 
       //----------------------------------------------------------------
       // every 4th thread works on the same linked list that

Modified: sandbox/stm/branches/vbe/libs/stm/test/testHashMapAndLinkedListsWithLocks.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testHashMapAndLinkedListsWithLocks.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testHashMapAndLinkedListsWithLocks.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -156,7 +156,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static void* TestLinkedListInserts(void *threadId)
+void* TestLinkedListInserts(void *threadId)
 {
    LATM::list_node<int> node;
    transaction::initialize_thread();
@@ -197,7 +197,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {

Modified: sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -69,7 +69,7 @@
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -110,7 +110,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -155,7 +155,7 @@
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -195,7 +195,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -238,7 +238,7 @@
 void TestLinkedListSetsWithLocks()
 {
    static std::vector<int> runVector;
- int iterations = 0;
+ //int iterations = 0;
 
    usingSingleList = false;
 
@@ -255,7 +255,7 @@
    }
 
    kMainThreadId = kMaxThreads-1;
- int lists = (kMaxThreads / 4) * 3;
+ //int lists = (kMaxThreads / 4) * 3;
 
    for (int k = 0; k < kMaxThreads; ++k)
    {
@@ -264,7 +264,7 @@
       transaction::initialize();
       transaction::initialize_thread();
 
- int index = convertThreadIdToLinkedListIndex(k);
+ (void)convertThreadIdToLinkedListIndex(k);
 
       //----------------------------------------------------------------
       // every 4th thread works on the same linked list that

Modified: sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testLL_latm.h 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -32,11 +32,11 @@
 {
 public:
 
- list_node() : value_(0), next_(0) {}
- explicit list_node(int const &rhs) : value_(rhs), next_(NULL) {}
+ list_node() : next_(0), value_(0) {}
+ explicit list_node(int const &rhs) : next_(0), value_(rhs) {}
 
    // zero initialization for native types
- void clear() { value_ = T(); next_ = NULL; }
+ void clear() { value_ = T(); next_ = 0; }
 
    T &value() { return value_; }
    T const &value() const { return value_; }
@@ -48,13 +48,13 @@
 
    void next(list_node const *rhs, boost::stm::transaction &t)
    {
- if (NULL == rhs) next_ = NULL;
+ if (0 == rhs) next_ = 0;
       else next_ = &t.find_original(*(list_node*)rhs);
    }
 
    void next_for_new_mem(list_node *rhs, boost::stm::transaction &t)
    {
- if (NULL == rhs) next_ = NULL;
+ if (0 == rhs) next_ = 0;
       else next_ = &t.find_original(*rhs);
    }
 
@@ -93,7 +93,7 @@
    LinkedList()
    {
 #ifndef BOOST_STM_USE_BOOST_MUTEX
- pthread_mutex_init (&list_lock_, NULL);
+ pthread_mutex_init (&list_lock_, 0);
 #endif
       head_.value() = T();
    }
@@ -205,7 +205,7 @@
 
       list_node<T> *headP = &head_;
 
- if (NULL != headP->next())
+ if (0 != headP->next())
       {
          list_node<T> *prev = headP;
          list_node<T> *cur = headP->next();
@@ -224,7 +224,7 @@
 
             list_node<T> *curNext = cur->next();
 
- if (NULL == curNext) break;
+ if (0 == curNext) break;
 
             cur = curNext;
          }
@@ -232,10 +232,10 @@
          list_node<T> *newNode = new list_node<T>(rhs);
 
          //--------------------------------------------------------------------
- // if cur->next() is null it means our newNode value is greater than
+ // if cur->next() is 0 it means our newNode value is greater than
          // cur, so insert ourselves after cur.
          //--------------------------------------------------------------------
- if (NULL == cur->next()) cur->next(newNode);
+ if (0 == cur->next()) cur->next(newNode);
          //--------------------------------------------------------------------
          // otherwise, we are smaller than cur, so insert between prev and cur
          //--------------------------------------------------------------------
@@ -272,7 +272,7 @@
             return true;
          }
 
- if (NULL == cur->next()) break;
+ if (0 == cur->next()) break;
       }
 
       transaction::unlock_(&list_lock_);
@@ -284,7 +284,7 @@
    bool remove(list_node<T> const &node)
    {
       using namespace boost::stm;
- bool succeeded = true;
+ //bool succeeded = true;
 
       for (transaction t; ; t.restart())
       {
@@ -298,7 +298,7 @@
    void outputList(std::ofstream &o)
    {
       int i = 0;
- for (list_node<T> *cur = head_.next(); cur != NULL; cur = cur->next())
+ for (list_node<T> *cur = head_.next(); cur != 0; cur = cur->next())
       {
          o << "element [" << i++ << "]: " << cur->value() << std::endl;
       }
@@ -309,7 +309,7 @@
    int walk_size()
    {
       int i = 0;
- for (list_node<T> *cur = head_.next(); cur != NULL; cur = cur->next())
+ for (list_node<T> *cur = head_.next(); cur != 0; cur = cur->next())
       {
          ++i;
       }
@@ -321,7 +321,7 @@
    //--------------------------------------------------------------------------
    void quick_clear()
    {
- for (list_node<T> *cur = head_.next(); cur != NULL;)
+ for (list_node<T> *cur = head_.next(); cur != 0;)
       {
          list_node<T> *prev = cur;
          cur = cur->next();
@@ -340,7 +340,7 @@
       {
          try
          {
- for (list_node<T> *cur = t.read(head_).next(); cur != NULL;)
+ for (list_node<T> *cur = t.read(head_).next(); cur != 0;)
             {
                list_node<T> *prev = &t.read(*cur);
                cur = t.read(*cur).next();
@@ -363,7 +363,7 @@
    {
       list_node<T> *headP = &t.read(head_);
 
- if (NULL != headP->next())
+ if (0 != headP->next())
       {
          list_node<T> *prev = headP;
          list_node<T> *cur = t.read_ptr(headP->next());
@@ -378,7 +378,7 @@
 
             list_node<T> *curNext = t.read_ptr(cur->next());
 
- if (NULL == curNext) break;
+ if (0 == curNext) break;
 
             cur = curNext;
          }
@@ -386,10 +386,10 @@
          list_node<T> *newNode = t.new_memory_copy(rhs);
 
          //--------------------------------------------------------------------
- // if cur->next() is null it means our newNode value is greater than
+ // if cur->next() is 0 it means our newNode value is greater than
          // cur, so insert ourselves after cur.
          //--------------------------------------------------------------------
- if (NULL == cur->next()) t.write_ptr(cur)->next_for_new_mem(newNode, t);
+ if (0 == cur->next()) t.write_ptr(cur)->next_for_new_mem(newNode, t);
          //--------------------------------------------------------------------
          // otherwise, we are smaller than cur, so insert between prev and cur
          //--------------------------------------------------------------------
@@ -426,7 +426,7 @@
             return true;
          }
 
- if (NULL == trueCur->next()) break;
+ if (0 == trueCur->next()) break;
       }
 
       return false;
@@ -438,11 +438,11 @@
    {
       list_node<T> const *prev = &t.read(head_);
 
- for (list_node<T> const *cur = prev; cur != NULL; prev = cur)
+ for (list_node<T> const *cur = prev; cur != 0; prev = cur)
       {
          cur = t.read(*cur).next();
 
- if (NULL == cur) break;
+ if (0 == cur) break;
 
          if (cur->value() == rhs.value())
          {
@@ -467,7 +467,7 @@
 
       list_node<T> const *headP = &t.read(head_);
 
- if (NULL != headP->next())
+ if (0 != headP->next())
       {
          list_node<T> const *prev = headP;
          list_node<T> const *cur = t.read_ptr(headP->next());
@@ -482,7 +482,7 @@
 
             list_node<T> const *curNext = t.read_ptr(cur->next());
 
- if (NULL == curNext) break;
+ if (0 == curNext) break;
 
             cur = curNext;
          }
@@ -490,10 +490,10 @@
          list_node<T> *newNode = t.new_memory_copy(rhs);
 
          //--------------------------------------------------------------------
- // if cur->next() is null it means our newNode value is greater than
+ // if cur->next() is 0 it means our newNode value is greater than
          // cur, so insert ourselves after cur.
          //--------------------------------------------------------------------
- if (NULL == cur->next()) t.write_ptr((list_node<T>*)cur)->next_for_new_mem(newNode, t);
+ if (0 == cur->next()) t.write_ptr((list_node<T>*)cur)->next_for_new_mem(newNode, t);
          //--------------------------------------------------------------------
          // otherwise, we are smaller than cur, so insert between prev and cur
          //--------------------------------------------------------------------
@@ -522,7 +522,7 @@
 
       list_node<T> const *prev = &t.read(head_);
 
- for (list_node<T> const *cur = prev; cur != NULL;
+ for (list_node<T> const *cur = prev; cur != 0;
            prev = cur, cur = t.read(*cur).next())
       {
          if (cur->value() == rhs.value())

Modified: sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -49,7 +49,7 @@
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -84,7 +84,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -130,7 +130,7 @@
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -165,7 +165,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -207,7 +207,7 @@
 void TestLinkedListWithLocks()
 {
    static std::vector<int> runVector;
- int iterations = 0;
+ //int iterations = 0;
 
    llist = new LATM::LinkedList<list_node_type>;
    transaction::initialize();

Modified: sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testLinkedListWithLocks.h 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -33,7 +33,7 @@
 {
 public:
 
- list_node() : value_(0), next_(0) {}
+ list_node() : next_(0), value_(0) {}
    explicit list_node(int const &rhs) : value_(rhs), next_(NULL) {}
 
    // zero initialization for native types
@@ -260,7 +260,7 @@
    bool remove(list_node<T> const &node)
    {
       using namespace boost::stm;
- bool succeeded = true;
+ //bool succeeded = true;
 
       for (transaction t; ; t.restart())
       {

Modified: sandbox/stm/branches/vbe/libs/stm/test/testRBTree.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testRBTree.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testRBTree.h 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -55,12 +55,12 @@
    typedef T type;
 
     ////////////////////////////////////////////////////////////////////////////
- RedBlackNode(T const &in) : value_(in), color_(nRedBlackTree::eRed),
- parent_(&sentinel), left_(&sentinel), right_(&sentinel) {}
+ RedBlackNode(T const &in) : color_(nRedBlackTree::eRed), value_(in),
+ left_(&sentinel), right_(&sentinel), parent_(&sentinel) {}
 
    ////////////////////////////////////////////////////////////////////////////
- RedBlackNode() : value_(T()), color_(nRedBlackTree::eRed), parent_(&sentinel),
- left_(&sentinel), right_(&sentinel) {}
+ RedBlackNode() : color_(nRedBlackTree::eRed), value_(T()),
+ left_(&sentinel), right_(&sentinel), parent_(&sentinel) {}
 
    T const & const_value(boost::stm::transaction &t) const
    { return t.read(*const_cast<RedBlackNode<T>*>(this)).value_; }

Modified: sandbox/stm/branches/vbe/libs/stm/test/testatom.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/testatom.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/testatom.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -53,7 +53,7 @@
 //-----------------------------------------------------------------------------
 void* AccountEntry(void* threadId)
 {
- static bool first = true;
+ //static bool first = true;
 
         stm::transaction::initialize_thread();
    int start = *(int*)threadId;

Modified: sandbox/stm/branches/vbe/libs/stm/test/transferFun.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/transferFun.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/transferFun.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -56,14 +56,14 @@
 {
    transaction::initialize_thread();
 
- int id = *(int*)threadId;
+ //int id = *(int*)threadId;
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
- int endingValue = startingValue + kMaxInserts;
+ //int endingValue = startingValue + kMaxInserts;
 
    idleUntilAllThreadsHaveReached(*(int*)threadId);
 
@@ -103,7 +103,7 @@
 void TestTransferFunctionMultipleThreads()
 {
    static std::vector<int> runVector;
- int iterations = 0;
+ //int iterations = 0;
 
    global_int2.value() = 0;
 

Modified: sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.cpp 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -22,12 +22,12 @@
 static Mutex L = PTHREAD_MUTEX_INITIALIZER;
 static Mutex L2 = PTHREAD_MUTEX_INITIALIZER;
 static Mutex L3 = PTHREAD_MUTEX_INITIALIZER;
-static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
+//static Mutex L4 = PTHREAD_MUTEX_INITIALIZER;
 #else
 static Mutex L;
 static Mutex L2;
 static Mutex L3;
-static Mutex L4;
+//static Mutex L4;
 #endif
 
 using namespace boost::stm;
@@ -113,14 +113,14 @@
 using namespace nMain;
 
 ///////////////////////////////////////////////////////////////////////////////
-static void* TestLinkedListInsertsWithLocks(void *threadId)
+void* TestLinkedListInsertsWithLocksBis(void *threadId)
 {
    newSyntaxNS::list_node<list_node_type> node;
    transaction::initialize_thread();
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -156,7 +156,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -195,14 +195,14 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static void* TestLinkedListInserts(void *threadId)
+void* TestLinkedListInsertsBis(void *threadId)
 {
    newSyntaxNS::list_node<list_node_type> node;
    transaction::initialize_thread();
 
    int start = *(int*)threadId;
    int startingValue = start * kMaxInserts;
- int threadInserts = 0;
+ //int threadInserts = 0;
 
    if (kInsertSameValues) startingValue = 0;
 
@@ -237,7 +237,7 @@
 
    if (kDoLookup)
    {
- bool allFound = true;
+ //bool allFound = true;
 
       for (i = startingValue; i < endingValue; ++i)
       {
@@ -308,7 +308,7 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
-static void TestNested()
+void TestNested()
 {
    atomic(t)
    {
@@ -385,7 +385,7 @@
 void TestLinkedListWithUsingLocks()
 {
    static std::vector<int> runVector;
- int iterations = 0;
+ //int iterations = 0;
 
    llist = new newSyntaxNS::LinkedList<list_node_type>;
 

Modified: sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h
==============================================================================
--- sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h (original)
+++ sandbox/stm/branches/vbe/libs/stm/test/usingLockTx.h 2009-10-15 15:09:30 EDT (Thu, 15 Oct 2009)
@@ -260,7 +260,7 @@
    bool remove(list_node<T> const &node)
    {
       using namespace boost::stm;
- bool succeeded = true;
+ //bool succeeded = true;
 
       for (transaction t; ; t.restart())
       {


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk