Bug 972693 - Explicitly ignore return values from moz_posix_memalign, r=glandium
authorMichael Wu <mwu@mozilla.com>
Fri, 14 Feb 2014 02:15:44 -0500
changeset 169322 aa1d1f75e73edba6de3f5bab8d85b1ded0916806
parent 169321 170ddce90260e788e94f0b44c270f1a344b9b970
child 169323 503ddb7e125e05a6b46dd5bdbb3ce35897373d10
push id26244
push userryanvm@gmail.com
push dateTue, 18 Feb 2014 20:04:04 +0000
treeherdermozilla-central@6660fdb0885b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs972693
milestone30.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 972693 - Explicitly ignore return values from moz_posix_memalign, r=glandium
memory/mozalloc/VolatileBufferFallback.cpp
memory/mozalloc/VolatileBufferOSX.cpp
--- a/memory/mozalloc/VolatileBufferFallback.cpp
+++ b/memory/mozalloc/VolatileBufferFallback.cpp
@@ -24,17 +24,17 @@ bool VolatileBuffer::Init(size_t aSize, 
   MOZ_ASSERT(!mSize && !mBuf, "Init called twice");
   MOZ_ASSERT(!(aAlignment % sizeof(void *)),
              "Alignment must be multiple of pointer size");
 
   mSize = aSize;
 #if defined(MOZ_MEMORY)
   posix_memalign(&mBuf, aAlignment, aSize);
 #elif defined(HAVE_POSIX_MEMALIGN)
-  moz_posix_memalign(&mBuf, aAlignment, aSize);
+  (void)moz_posix_memalign(&mBuf, aAlignment, aSize);
 #else
 #error "No memalign implementation found"
 #endif
   return !!mBuf;
 }
 
 VolatileBuffer::~VolatileBuffer()
 {
--- a/memory/mozalloc/VolatileBufferOSX.cpp
+++ b/memory/mozalloc/VolatileBufferOSX.cpp
@@ -41,17 +41,17 @@ VolatileBuffer::Init(size_t aSize, size_
                     (vm_address_t*)&mBuf,
                     mSize,
                     VM_FLAGS_PURGABLE | VM_FLAGS_ANYWHERE);
   if (ret == KERN_SUCCESS) {
     return true;
   }
 
 heap_alloc:
-  moz_posix_memalign(&mBuf, aAlignment, aSize);
+  (void)moz_posix_memalign(&mBuf, aAlignment, aSize);
   mHeap = true;
   return !!mBuf;
 }
 
 VolatileBuffer::~VolatileBuffer()
 {
   if (OnHeap()) {
     free(mBuf);