Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / interprocess / test / intersegment_ptr_test.cpp
index 709acd4..cacdbbd 100644 (file)
@@ -1,6 +1,6 @@
 //////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga 2007. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2007-2012. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -48,7 +48,7 @@ bool test_types_and_convertions()
    pcint_t  pcint(0);
    pvint_t  pvint(0);
    pcvint_t pcvint(0);
-  
+
    pint     = &dummy_int;
    pcint    = &dummy_int;
    pvint    = &dummy_int;
@@ -75,7 +75,7 @@ bool test_arithmetic()
    typedef intersegment_ptr<int> pint_t;
    const int NumValues = 5;
    int values[NumValues];
-  
+
    //Initialize p
    pint_t p = values;
    if(p.get() != values)
@@ -130,15 +130,15 @@ bool test_arithmetic()
    //ptr++
    penew = p0;
    for(int j = 0; j != NumValues; ++j){
-      pint_t p = penew;
-      if(p != penew++)
+      pint_t pnew_copy = penew;
+      if(pnew_copy != penew++)
          return false;
    }
    //ptr--
    p0 = pe;
    for(int j = 0; j != NumValues; ++j){
-      pint_t p = p0;
-      if(p != p0--)
+      pint_t p0_copy = p0;
+      if(p0_copy != p0--)
          return false;
    }
 
@@ -376,7 +376,7 @@ bool test_multi_segment_shared_memory()
       shared_memory_object::remove("kk0");
       managed_multi_shared_memory mshm(create_only, "kk", 4096);
    }
-  
+
    shared_memory_object::remove("kk0");
    return true;
 }