aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest-linked_ptr_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtest-linked_ptr_test.cc')
-rw-r--r--test/gtest-linked_ptr_test.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/gtest-linked_ptr_test.cc b/test/gtest-linked_ptr_test.cc
index efd6b1ed..0d5508ae 100644
--- a/test/gtest-linked_ptr_test.cc
+++ b/test/gtest-linked_ptr_test.cc
@@ -77,7 +77,8 @@ class LinkedPtrTest : public testing::Test {
TEST_F(LinkedPtrTest, GeneralTest) {
{
linked_ptr<A> a0, a1, a2;
- a0 = a0;
+ // Use explicit function call notation here to suppress self-assign warning.
+ a0.operator=(a0);
a1 = a2;
ASSERT_EQ(a0.get(), static_cast<A*>(NULL));
ASSERT_EQ(a1.get(), static_cast<A*>(NULL));