diff options
author | alkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2013-07-06 21:54:34 +0000 |
---|---|---|
committer | alkondratenko@gmail.com <alkondratenko@gmail.com@6b5cf1ce-ec42-a296-1ba9-69fdba395a50> | 2013-07-06 21:54:34 +0000 |
commit | e54971d58641853a9515d9f0313645729eab113a (patch) | |
tree | f83271d09994742c2e56e7eb7cd2351924697590 /src/tests | |
parent | 7dd038d7c58c9de889e3fcc552161533ea1baab1 (diff) | |
download | gperftools-e54971d58641853a9515d9f0313645729eab113a.tar.gz |
issue-534: fixed a number of gcc warnings
This applies patch from Adhemerval Zanella.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@221 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/heap-checker_unittest.cc | 5 | ||||
-rw-r--r-- | src/tests/page_heap_test.cc | 1 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/heap-checker_unittest.cc b/src/tests/heap-checker_unittest.cc index ab326c9..75c05f8 100644 --- a/src/tests/heap-checker_unittest.cc +++ b/src/tests/heap-checker_unittest.cc @@ -338,7 +338,7 @@ static void DoRunHidden(Closure* c, int n) { VLOG(10) << "Wipe level " << n << " at " << &n; if (n) { const int sz = 30; - volatile int arr[sz]; + volatile int arr[sz] ATTRIBUTE_UNUSED; for (int i = 0; i < sz; ++i) arr[i] = 0; (*wipe_stack_ptr)(n-1); sleep(0); // undo -foptimize-sibling-calls @@ -570,7 +570,8 @@ static void TestHiddenPointer() { // the xor trick itself works, as without it nothing in this // test suite would work. See the Hide/Unhide/*Hidden* set // of helper methods. - CHECK_NE(foo, *reinterpret_cast<void**>(&p)); + void **pvoid = reinterpret_cast<void**>(&p); + CHECK_NE(foo, *pvoid); } // simple tests that deallocate what they allocated diff --git a/src/tests/page_heap_test.cc b/src/tests/page_heap_test.cc index f08387c..5bd803d 100644 --- a/src/tests/page_heap_test.cc +++ b/src/tests/page_heap_test.cc @@ -43,7 +43,6 @@ static void TestPageHeap_Stats() { // Split span 's1' into 's1', 's2'. Delete 's2' tcmalloc::Span* s2 = ph->Split(s1, 128); - Length s2_len = s2->length; ph->Delete(s2); CheckStats(ph, 256, 128, 0); |