diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/heap-profiler.cc | 2 | ||||
-rw-r--r-- | src/profiler.cc | 2 | ||||
-rw-r--r-- | src/tests/heap-checker_unittest.cc | 4 | ||||
-rw-r--r-- | src/tests/page_heap_test.cc | 1 |
4 files changed, 5 insertions, 4 deletions
diff --git a/src/heap-profiler.cc b/src/heap-profiler.cc index 532d0f2..f1f2c21 100644 --- a/src/heap-profiler.cc +++ b/src/heap-profiler.cc @@ -293,7 +293,7 @@ static void MaybeDumpProfileLocked() { } else if (FLAGS_heap_profile_time_interval > 0 && current_time - last_dump_time >= FLAGS_heap_profile_time_interval) { - snprintf(buf, sizeof(buf), "%d sec since the last dump", + snprintf(buf, sizeof(buf), "%" PRId64 " sec since the last dump", current_time - last_dump_time); need_to_dump = true; last_dump_time = current_time; diff --git a/src/profiler.cc b/src/profiler.cc index a850bb7..3d6abe3 100644 --- a/src/profiler.cc +++ b/src/profiler.cc @@ -205,7 +205,7 @@ CpuProfiler::CpuProfiler() if (signal_number_str != NULL) { long int signal_number = strtol(signal_number_str, NULL, 10); - printf("<debug> signal_number=%d\n", signal_number); + printf("<debug> signal_number=%" PRId64 "\n", signal_number); if (signal_number >=1 && signal_number <=64) { sighandler_t old_signal_handler = signal(signal_number, CpuProfilerSwitch); 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); |