diff options
author | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-02-02 19:29:39 -0200 |
---|---|---|
committer | Adhemerval Zanella <azanella@linux.vnet.ibm.com> | 2014-02-02 19:29:39 -0200 |
commit | 23abe4d2846dc91e84cc4eb8756b4a53fb09825f (patch) | |
tree | 897c8af21da0cfb3609d745f5b5cb9b1ef82afa5 /src/tests | |
parent | 05c33f53081cf737852f86bf3e19891e99043103 (diff) | |
download | gperftools-23abe4d2846dc91e84cc4eb8756b4a53fb09825f.tar.gz |
Fix compiler warnings
Diffstat (limited to 'src/tests')
-rw-r--r-- | src/tests/heap-checker_unittest.cc | 4 | ||||
-rw-r--r-- | src/tests/page_heap_test.cc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/tests/heap-checker_unittest.cc b/src/tests/heap-checker_unittest.cc index ab326c9..ba25079 100644 --- a/src/tests/heap-checker_unittest.cc +++ b/src/tests/heap-checker_unittest.cc @@ -340,6 +340,7 @@ static void DoRunHidden(Closure* c, int n) { const int sz = 30; volatile int arr[sz]; for (int i = 0; i < sz; ++i) arr[i] = 0; + (void)arr; (*wipe_stack_ptr)(n-1); sleep(0); // undo -foptimize-sibling-calls } @@ -570,7 +571,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** rp = reinterpret_cast<void**>(&p); + CHECK_NE(foo, *rp); } // 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); |