diff options
author | Andy Schwerin <schwerin@10gen.com> | 2014-01-16 15:47:17 -0500 |
---|---|---|
committer | Andy Schwerin <schwerin@10gen.com> | 2014-01-16 17:07:31 -0500 |
commit | 575ce48bb4dbeef3980c9c47a7cb1dae91576949 (patch) | |
tree | 194c7cceb9bf388da5989bfb1e97395344f46413 /src/third_party | |
parent | 3169e1d6d7eb7306302c423b5710c5ce077ca7be (diff) | |
download | mongo-575ce48bb4dbeef3980c9c47a7cb1dae91576949.tar.gz |
Swallow return value of writes in tcmalloc profiling code, to satisfy some compilers.
Diffstat (limited to 'src/third_party')
-rw-r--r-- | src/third_party/gperftools-2.0/src/tcmalloc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/third_party/gperftools-2.0/src/tcmalloc.cc b/src/third_party/gperftools-2.0/src/tcmalloc.cc index 095718ec9c7..0571228b6db 100644 --- a/src/third_party/gperftools-2.0/src/tcmalloc.cc +++ b/src/third_party/gperftools-2.0/src/tcmalloc.cc @@ -86,6 +86,8 @@ // * allocation of a reasonably complicated struct // goes from about 1100 ns to about 300 ns. +#include "mongo/platform/compiler.h" + #include "config.h" #include <gperftools/tcmalloc.h> @@ -481,7 +483,7 @@ static void PrintStats(int level) { char* buffer = new char[kBufferSize]; TCMalloc_Printer printer(buffer, kBufferSize); DumpStats(&printer, level); - write(STDERR_FILENO, buffer, strlen(buffer)); + MONGO_COMPILER_VARIABLE_UNUSED ssize_t ignored = write(STDERR_FILENO, buffer, strlen(buffer)); delete[] buffer; } @@ -991,7 +993,7 @@ static void ReportLargeAlloc(Length num_pages, void* result) { printer.printf(" %p", stack.stack[i]); } printer.printf("\n"); - write(STDERR_FILENO, buffer, strlen(buffer)); + MONGO_COMPILER_VARIABLE_UNUSED ssize_t ignored = write(STDERR_FILENO, buffer, strlen(buffer)); } inline void* cpp_alloc(size_t size, bool nothrow); |