Merge "Mark the return of munmap() as unused." into main am: 7153373983
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3244900
Change-Id: I7f6e76a0537355440cfbd7d71b0bf378d2d38dcb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index e8fe555..4b7af45 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1725,7 +1725,9 @@
}
}
}
- ::munmap(ptr, len);
+ if (::munmap(ptr, len) == -1) {
+ ALOGW("munmap() failed: %s", strerror(errno));
+ }
}
::close(fd);
return status;
@@ -3332,7 +3334,9 @@
void Parcel::Blob::release() {
if (mFd != -1 && mData) {
- ::munmap(mData, mSize);
+ if (::munmap(mData, mSize) == -1) {
+ ALOGW("munmap() failed: %s", strerror(errno));
+ }
}
clear();
}