Bug 794510 - Part 8: Use void* parameters to mmap and friends as opposed to caddr_t; r=bsmith
authorEhsan Akhgari <ehsan@mozilla.com>
Thu, 18 Oct 2012 15:00:31 -0400
changeset 110694 6a016c00dcc3640d4bd921bcbeaf22c7c7f80ef3
parent 110693 f86c9ae8f544e9ac7f22bd5279a1e73d2c35f0ae
child 110695 602330b6745c07cad8cbff140b338b314c05fef6
push id23708
push userryanvm@gmail.com
push dateFri, 19 Oct 2012 01:28:59 +0000
treeherdermozilla-central@fd5556088388 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmith
bugs794510
milestone19.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 794510 - Part 8: Use void* parameters to mmap and friends as opposed to caddr_t; r=bsmith caddr_t is an obsolete BSD type which we don't need to use any more.
layout/base/tests/cpp-tests/TestPoisonArea.cpp
--- a/layout/base/tests/cpp-tests/TestPoisonArea.cpp
+++ b/layout/base/tests/cpp-tests/TestPoisonArea.cpp
@@ -321,31 +321,31 @@ ExceptionHandler(PEXCEPTIONREPORTRECORD 
 #define LastErrMsg() (strerror(errno))
 
 static unsigned long _pagesize;
 #define PAGESIZE _pagesize
 
 static void *
 ReserveRegion(uintptr_t request, bool accessible)
 {
-  return mmap((caddr_t)request, PAGESIZE,
+  return mmap(reinterpret_cast<void*>(request), PAGESIZE,
               accessible ? PROT_READ|PROT_WRITE : PROT_NONE,
               MAP_PRIVATE|MAP_ANON, -1, 0);
 }
 
 static void
 ReleaseRegion(void *page)
 {
-  munmap((caddr_t)page, PAGESIZE);
+  munmap(page, PAGESIZE);
 }
 
 static bool
 ProbeRegion(uintptr_t page)
 {
-  if (madvise((caddr_t)page, PAGESIZE, MADV_NORMAL)) {
+  if (madvise(reinterpret_cast<void*>(page), PAGESIZE, MADV_NORMAL)) {
     return true;
   } else {
     return false;
   }
 }
 
 static int
 MakeRegionExecutable(void *page)