Fix build break: Make sure we use use unsigned comparisons.
The original CL was comparing signed and unsigned values, which triggers
a warning/error diagnostic.
Test: Built bullhead successfully.
Change-Id: I5fd6736690f9697b2b6c800f98a7ce3a6ada9c35
diff --git a/include/binder/Parcel.h b/include/binder/Parcel.h
index bd2213d..b0d53ef 100644
--- a/include/binder/Parcel.h
+++ b/include/binder/Parcel.h
@@ -681,13 +681,13 @@
return UNEXPECTED_NULL;
}
- if (val->max_size() < size) {
+ if (val->max_size() < static_cast<size_t>(size)) {
return NO_MEMORY;
}
val->resize(static_cast<size_t>(size));
- if (val->size() < size) {
+ if (val->size() < static_cast<size_t>(size)) {
return NO_MEMORY;
}