Bug 1035786 - Avoid warning-as-error sandbox build failure with an explicit cast. r=gdestuynder
authorJed Davis <jld@mozilla.com>
Thu, 10 Jul 2014 17:37:45 -0700
changeset 193959 78ebcfff12347b6cd921ddb8d240a89912b106d3
parent 193958 a2dde11f99061e3c0956069bdd09200056afa22c
child 193960 9362c573937919669e4a7464666e2d45e65498f3
push id46246
push usercbook@mozilla.com
push dateTue, 15 Jul 2014 07:27:39 +0000
treeherdermozilla-inbound@9362c5739379 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgdestuynder
bugs1035786
milestone33.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 1035786 - Avoid warning-as-error sandbox build failure with an explicit cast. r=gdestuynder getpid() is never negative, so this is safe.
security/sandbox/linux/SandboxFilter.cpp
--- a/security/sandbox/linux/SandboxFilter.cpp
+++ b/security/sandbox/linux/SandboxFilter.cpp
@@ -205,17 +205,17 @@ SandboxFilterImpl::Build() {
   // sigprocmask is a compatibility shim that assumes the pre-RT size.
 #if SYSCALL_EXISTS(sigprocmask)
   Allow(SYSCALL(sigprocmask));
 #endif
   Allow(SYSCALL(rt_sigprocmask));
 
   // Used by profiler.  Also used for raise(), which causes problems
   // with Android KitKat abort(); see bug 1004832.
-  Allow(SYSCALL_WITH_ARG(tgkill, 0, getpid()));
+  Allow(SYSCALL_WITH_ARG(tgkill, 0, uint32_t(getpid())));
 
   /* B2G specific low-frequency syscalls */
 #ifdef MOZ_WIDGET_GONK
   Allow(SOCKETCALL(sendto, SENDTO));
   Allow(SOCKETCALL(recvfrom, RECVFROM));
   Allow(SYSCALL_LARGEFILE(getdents, getdents64));
   Allow(SYSCALL(epoll_ctl));
   Allow(SYSCALL(sched_yield));