diff options
Diffstat (limited to 'libs/binder/PersistableBundle.cpp')
-rw-r--r-- | libs/binder/PersistableBundle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/PersistableBundle.cpp b/libs/binder/PersistableBundle.cpp index 5b157cc7c3..abb6612a1c 100644 --- a/libs/binder/PersistableBundle.cpp +++ b/libs/binder/PersistableBundle.cpp @@ -113,7 +113,7 @@ status_t PersistableBundle::writeToParcel(Parcel* parcel) const { // Backpatch length. This length value includes the length header. parcel->setDataPosition(length_pos); size_t length = end_pos - start_pos; - if (length > std::numeric_limits<int32_t>::max()) { + if (length > static_cast<size_t>(std::numeric_limits<int32_t>::max())) { ALOGE("Parcel length (%zu) too large to store in 32-bit signed int", length); return BAD_VALUE; } @@ -319,7 +319,7 @@ status_t PersistableBundle::writeToParcelInner(Parcel* parcel) const { * pairs themselves. */ size_t num_entries = size(); - if (num_entries > std::numeric_limits<int32_t>::max()) { + if (num_entries > static_cast<size_t>(std::numeric_limits<int32_t>::max())) { ALOGE("The size of this PersistableBundle (%zu) too large to store in 32-bit signed int", num_entries); return BAD_VALUE; |