summaryrefslogtreecommitdiffstats
path: root/third_party/tcmalloc/tcmalloc_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/tcmalloc/tcmalloc_linux.cc')
-rw-r--r--third_party/tcmalloc/tcmalloc_linux.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/third_party/tcmalloc/tcmalloc_linux.cc b/third_party/tcmalloc/tcmalloc_linux.cc
index 104520e..5b8e54a 100644
--- a/third_party/tcmalloc/tcmalloc_linux.cc
+++ b/third_party/tcmalloc/tcmalloc_linux.cc
@@ -488,7 +488,9 @@ static void PrintStats(int level) {
char* buffer = new char[kBufferSize];
TCMalloc_Printer printer(buffer, kBufferSize);
DumpStats(&printer, level);
- write(STDERR_FILENO, buffer, strlen(buffer));
+ ssize_t size = write(STDERR_FILENO, buffer, strlen(buffer));
+ // Use size so we don't get an unused variable warning.
+ CHECK(size);
delete[] buffer;
}