summaryrefslogtreecommitdiff
path: root/libs/binder/PersistableBundle.cpp
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2024-06-21 15:45:26 -0700
committer Tomasz Wasilczyk <twasilczyk@google.com> 2024-07-02 15:44:44 -0700
commit052c51302e797260763a44b537820b7d54b18226 (patch)
treeb188121ad8b28ed8519a27831d8d41c4d455e68e /libs/binder/PersistableBundle.cpp
parent90946c74069e740960a3ccb1cac2f42c6c99f411 (diff)
Binder: enable/fix some warnings
Bug: 341997808 Test: mma Change-Id: Ibd44eda768a714e85399a15f3c8e534d715f87ce
Diffstat (limited to 'libs/binder/PersistableBundle.cpp')
-rw-r--r--libs/binder/PersistableBundle.cpp4
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;