Bug 1601794- Fix building errors with clang. r=gsvelto
authorThinker Li <thinker.li@gmail.com>
Fri, 06 Dec 2019 04:59:26 +0000
changeset 567949 e2394b695d21cb2ceb4cc60f5fab8183a05e99d4
parent 567948 936a79e9f9de48f20acb4475a92c203cd39804c0
child 567950 76a22f7a6a45e4401f2b935a0fd7b5121db83588
push id12493
push userffxbld-merge
push dateMon, 06 Jan 2020 15:38:57 +0000
treeherdermozilla-beta@63ae456b848d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto
bugs1601794
milestone73.0a1
first release with
nightly linux32
e2394b695d21 / 73.0a1 / 20191206093947 / files
nightly linux64
e2394b695d21 / 73.0a1 / 20191206093947 / files
nightly mac
e2394b695d21 / 73.0a1 / 20191206093947 / files
nightly win32
e2394b695d21 / 73.0a1 / 20191206093947 / files
nightly win64
e2394b695d21 / 73.0a1 / 20191206093947 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1601794- Fix building errors with clang. r=gsvelto Bug 1601794- Fix building errors with clang. r=gsvelto Differential Revision: https://phabricator.services.mozilla.com/D56095
ipc/glue/ForkServer.cpp
ipc/glue/MiniTransceiver.cpp
--- a/ipc/glue/ForkServer.cpp
+++ b/ipc/glue/ForkServer.cpp
@@ -84,17 +84,17 @@ CleanCString(nsCString& str) {
 }
 
 inline void
 CleanString(std::string& str) {
   const char deadbeef[] =
       "\xde\xad\xbe\xef\xde\xad\xbe\xef\xde\xad\xbe\xef\xde\xad\xbe\xef"
       "\xde\xad\xbe\xef\xde\xad\xbe\xef\xde\xad\xbe\xef\xde\xad\xbe\xef";
   int pos = 0;
-  unsigned long sz = str.size();
+  size_t sz = str.size();
   while (sz > 0) {
     int toclean = std::min(sz, sizeof(deadbeef) - 1);
     str.replace(pos, toclean, deadbeef);
     sz -= toclean;
     pos += toclean;
   }
 }
 
--- a/ipc/glue/MiniTransceiver.cpp
+++ b/ipc/glue/MiniTransceiver.cpp
@@ -160,17 +160,17 @@ MiniTransceiver::RecvFDs(msghdr* aHdr, i
 }
 
 bool
 MiniTransceiver::RecvData(char* aDataBuf, size_t aBufSize, uint32_t* aMsgSize,
                           int* aFdsBuf, unsigned aMaxFds, unsigned* aNumFds) {
     msghdr hdr;
     InitMsgHdr(&hdr, 1, aMaxFds);
 
-    UniquePtr<msghdr, typeof(&DeinitMsgHdr)> uniq(&hdr, &DeinitMsgHdr);
+    UniquePtr<msghdr, decltype(&DeinitMsgHdr)> uniq(&hdr, &DeinitMsgHdr);
 
     // The buffer to collect all fds received from the socket.
     int* all_fds = aFdsBuf;
     unsigned num_all_fds = 0;
 
     size_t total_readed = 0;
     uint32_t msgsz = 0;
     while (msgsz == 0 || total_readed < msgsz) {