Bug 1200097 - Fix warnings in logalloc. r=glandium.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 31 Aug 2015 16:53:13 -0700
changeset 292851 cd30c9b6ee534953f001f5a51d5fdc7c96b923e1
parent 292850 e4e12583c280bff2a12fc168dd2933e09d02adb3
child 292852 66a7b65bdff9a6b844b0e37aa93eb375098ba835
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1200097
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1200097 - Fix warnings in logalloc. r=glandium.
memory/replace/logalloc/FdPrintf.cpp
memory/replace/logalloc/moz.build
memory/replace/logalloc/replay/moz.build
--- a/memory/replace/logalloc/FdPrintf.cpp
+++ b/memory/replace/logalloc/FdPrintf.cpp
@@ -8,16 +8,17 @@
 
 #ifdef _WIN32
 #include <windows.h>
 #else
 #include <unistd.h>
 #endif
 #include <cstring>
 #include "mozilla/Assertions.h"
+#include "mozilla/unused.h"
 
 /* Template class allowing a limited number of increments on a value */
 template <typename T>
 class CheckedIncrement
 {
 public:
   CheckedIncrement(T aValue, size_t aMaxIncrement)
     : mValue(aValue), mMaxIncrement(aMaxIncrement)
@@ -120,12 +121,12 @@ FdPrintf(intptr_t aFd, const char* aForm
     f++;
   }
 out:
 #ifdef _WIN32
   // See comment in FdPrintf.h as to why WriteFile is used.
   DWORD written;
   WriteFile(reinterpret_cast<HANDLE>(aFd), buf, b - buf, &written, nullptr);
 #else
-  write(aFd, buf, b - buf);
+  mozilla::unused << write(aFd, buf, b - buf);
 #endif
   va_end(ap);
 }
--- a/memory/replace/logalloc/moz.build
+++ b/memory/replace/logalloc/moz.build
@@ -33,11 +33,8 @@ include('/ipc/chromium/chromium-config.m
 if CONFIG['OS_TARGET'] == 'Android':
     USE_LIBS += [
         'mozglue',
     ]
 
 DIRS += [
     'replay',
 ]
-
-# XXX: We should fix these warnings
-ALLOW_COMPILER_WARNINGS = True
--- a/memory/replace/logalloc/replay/moz.build
+++ b/memory/replace/logalloc/replay/moz.build
@@ -16,11 +16,8 @@ LOCAL_INCLUDES += [
 ]
 
 # Link replace-malloc and the default allocator.
 USE_LIBS += [
     'memory',
 ]
 
 DISABLE_STL_WRAPPING = True
-
-# XXX: We should fix these warnings
-ALLOW_COMPILER_WARNINGS = True