diff options
author | 2024-06-21 15:45:26 -0700 | |
---|---|---|
committer | 2024-07-03 17:34:25 +0000 | |
commit | 370408e8d796adabaa84e4e2d488d529f9f1b38f (patch) | |
tree | 6a0db98b2bff2067a142a39edb71b9ca03abb45c /libs/binder/PersistableBundle.cpp | |
parent | 79887b432800ba1907b38b33776b86cd76655d27 (diff) |
Binder: enable/fix some warnings
Bug: 341997808
Test: mma
Change-Id: Ibd44eda768a714e85399a15f3c8e534d715f87ce
Merged-In: Ibd44eda768a714e85399a15f3c8e534d715f87ce
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; |