Fix implicit conversions

Test: m libhidl
Bug: 129481165
Change-Id: Ic9a6d974f0ad59c42c052d1cb02001407f4929a3
diff --git a/base/include/hidl/MQDescriptor.h b/base/include/hidl/MQDescriptor.h
index 0f61cb5..07caa95 100644
--- a/base/include/hidl/MQDescriptor.h
+++ b/base/include/hidl/MQDescriptor.h
@@ -234,9 +234,8 @@
             mHandle->data[i] = dup(other.mHandle->data[i]);
         }
 
-        memcpy(&mHandle->data[other.mHandle->numFds],
-               &other.mHandle->data[other.mHandle->numFds],
-               other.mHandle->numInts * sizeof(int));
+        memcpy(&mHandle->data[other.mHandle->numFds], &other.mHandle->data[other.mHandle->numFds],
+               static_cast<size_t>(other.mHandle->numInts) * sizeof(int));
     }
 
     return *this;
@@ -258,7 +257,7 @@
 
 template<typename T, MQFlavor flavor>
 size_t MQDescriptor<T, flavor>::getSize() const {
-  return mGrantors[DATAPTRPOS].extent;
+    return static_cast<size_t>(mGrantors[DATAPTRPOS].extent);
 }
 
 template<typename T, MQFlavor flavor>