Silence a -Wshorten-64-to-32 warning.
Silence
system/libhidl/base/include/hidl/HidlSupport.h:426:17: error: implicit
conversion loses integer precision: 'size_t' (aka 'unsigned long') to
'uint32_t' (aka 'unsigned int') [-Werror,-Wshorten-64-to-32]
Test: builds
Change-Id: I383e79e4f9b89bb4dce3b9c91199ca3a7f91e959
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index 0e66ceb..61a8bea 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -423,7 +423,7 @@
// copy from an array-like object, assuming my resources are freed.
template <typename Array>
void copyFrom(const Array &data, size_t size) {
- mSize = size;
+ mSize = static_cast<uint32_t>(size);
mOwnsBuffer = true;
if (mSize > 0) {
mBuffer = new T[size];