Merge "libbinder: fix type of return value from {send,read}_msg" am: 2a2071242b

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2173482

Change-Id: If73b19a59f69340a6de45ae305046ab78a271fea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/binder/trusty/RpcTransportTipcTrusty.cpp b/libs/binder/trusty/RpcTransportTipcTrusty.cpp
index e0d80fb..dc27eb9 100644
--- a/libs/binder/trusty/RpcTransportTipcTrusty.cpp
+++ b/libs/binder/trusty/RpcTransportTipcTrusty.cpp
@@ -64,7 +64,7 @@
                 .num_handles = 0, // TODO: add ancillaryFds
                 .handles = nullptr,
         };
-        int rc = send_msg(mSocket.get(), &msg);
+        ssize_t rc = send_msg(mSocket.get(), &msg);
         if (rc == ERR_NOT_ENOUGH_BUFFER) {
             // Peer is blocked, wait until it unblocks.
             // TODO: when tipc supports a send-unblocked handler,
@@ -89,7 +89,7 @@
             return statusFromTrusty(rc);
         }
         LOG_ALWAYS_FATAL_IF(static_cast<size_t>(rc) != size,
-                            "Sent the wrong number of bytes %d!=%zu", rc, size);
+                            "Sent the wrong number of bytes %zd!=%zu", rc, size);
 
         return OK;
     }
@@ -129,7 +129,7 @@
                     .num_handles = 0, // TODO: support ancillaryFds
                     .handles = nullptr,
             };
-            int rc = read_msg(mSocket.get(), mMessageInfo.id, mMessageOffset, &msg);
+            ssize_t rc = read_msg(mSocket.get(), mMessageInfo.id, mMessageOffset, &msg);
             if (rc < 0) {
                 return statusFromTrusty(rc);
             }