Fixed -Wshadow warnings
[libcds.git] / test / unit / misc / cxx11_atomic_class.cpp
index d413176ca781142d1736d92ee575bc35b22339d6..4041d8f70a0ae595b9625610871119049dca0d3b 100644 (file)
     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#include <gtest/gtest.h>
+#include <cds_test/ext_gtest.h>
 #include <cds/algo/atomic.h>
 #include "cxx11_convert_memory_order.h"
 
-#define EXPECT_ATOMIC_IS_LOCK_FREE( x ) EXPECT_TRUE( x.is_lock_free() )
+#define EXPECT_ATOMIC_IS_LOCK_FREE( x ) EXPECT_TRUE( x.is_lock_free())
 
 namespace {
     class cxx11_atomic_class: public ::testing::Test
@@ -526,14 +526,14 @@ namespace {
             EXPECT_EQ( *a.load( oLoad ), 1 );
 
             for ( integral_type i = 1; i < aSize; ++i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i );
                 EXPECT_EQ( a.fetch_add( 1, order ), p );
                 EXPECT_EQ( *a.load( oLoad ), i + 1 );
             }
 
             for ( integral_type i = aSize; i > 1; --i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i  );
                 EXPECT_EQ( a.fetch_sub( 1, order ), p );
                 EXPECT_EQ( *a.load( oLoad ), i - 1 );
@@ -578,7 +578,7 @@ namespace {
             EXPECT_EQ( *a.load(), 1 );
 
             for ( integral_type i = 1; i < aSize; ++i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i );
                 integral_type * pa = a.fetch_add( 1 );
                 EXPECT_EQ( pa, p );
@@ -586,7 +586,7 @@ namespace {
             }
 
             for ( integral_type i = aSize; i > 1; --i ) {
-                integral_type * p = a.load();
+                p = a.load();
                 EXPECT_EQ( *p, i  );
                 EXPECT_EQ( a.fetch_sub( 1 ), p );
                 EXPECT_EQ( *a.load(), i - 1 );