Bug 925195 - Fix -Wsign-compare warning about GetProtocolId() enum return value. r=bent
authorChris Peterson <cpeterson@mozilla.com>
Thu, 17 Oct 2013 20:42:59 -0700
changeset 165264 fec466b50c14130ce09e5a12f9ea98e6b9bb16d4
parent 165263 8de556315ae67ab77b7f95284efbb25f48495c1a
child 165265 8d869af9efd89040297e837a16494355effaa232
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbent
bugs925195
milestone27.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 925195 - Fix -Wsign-compare warning about GetProtocolId() enum return value. r=bent
gfx/layers/ipc/ImageBridgeParent.cpp
--- a/gfx/layers/ipc/ImageBridgeParent.cpp
+++ b/gfx/layers/ipc/ImageBridgeParent.cpp
@@ -95,17 +95,16 @@ bool
 ImageBridgeParent::RecvUpdateNoSwap(const EditArray& aEdits)
 {
   InfallibleTArray<EditReply> noReplies;
   bool success = RecvUpdate(aEdits, &noReplies);
   NS_ABORT_IF_FALSE(noReplies.Length() == 0, "RecvUpdateNoSwap requires a sync Update to carry Edits");
   return success;
 }
 
-
 static void
 ConnectImageBridgeInParentProcess(ImageBridgeParent* aBridge,
                                   Transport* aTransport,
                                   ProcessHandle aOtherProcess)
 {
   aBridge->Open(aTransport, aOtherProcess, XRE_GetIOMessageLoop(), ipc::ParentSide);
 }
 
@@ -174,18 +173,16 @@ ImageBridgeParent::AllocPCompositablePar
 }
 
 bool ImageBridgeParent::DeallocPCompositableParent(PCompositableParent* aActor)
 {
   delete aActor;
   return true;
 }
 
-
-
 MessageLoop * ImageBridgeParent::GetMessageLoop() {
   return mMessageLoop;
 }
 
 void
 ImageBridgeParent::DeferredDestroy()
 {
   mSelfRef = nullptr;
@@ -193,17 +190,17 @@ ImageBridgeParent::DeferredDestroy()
 }
 
 IToplevelProtocol*
 ImageBridgeParent::CloneToplevel(const InfallibleTArray<ProtocolFdMapping>& aFds,
                                  base::ProcessHandle aPeerProcess,
                                  mozilla::ipc::ProtocolCloneContext* aCtx)
 {
   for (unsigned int i = 0; i < aFds.Length(); i++) {
-    if (aFds[i].protocolId() == (int)GetProtocolId()) {
+    if (aFds[i].protocolId() == unsigned(GetProtocolId())) {
       Transport* transport = OpenDescriptor(aFds[i].fd(),
                                             Transport::MODE_SERVER);
       PImageBridgeParent* bridge = Create(transport, base::GetProcId(aPeerProcess));
       bridge->CloneManagees(this, aCtx);
       bridge->IToplevelProtocol::SetTransport(transport);
       return bridge;
     }
   }