summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-05-03 18:27:24 +0000
committer Steven Moreland <smoreland@google.com> 2021-05-03 18:29:53 +0000
commit90c1f9ae471e3e213dfad92f64bc1a18aea4b2b9 (patch)
tree9082204e82c5c8c07979d08083531d175c4a2eb5 /libs/binder/Parcel.cpp
parent82261324f24bc43e30e12476f242d63397858df0 (diff)
libbinder: size checks for Parcel+IBinder
(the ones for Parcel are just improved) These types are used in prebuilts, so it's useful to know the size changes w/ having to wait for DOA devices. Bug: 166282674 Test: build only (these are compile-time checks) Change-Id: Ib6deda78a3f2bf537b3163ae7ea5a703b1c8e289
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 98ca829031..39d6a2ec4f 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -78,7 +78,11 @@ static size_t pad_size(size_t s) {
namespace android {
// many things compile this into prebuilts on the stack
-static_assert(sizeof(Parcel) == 60 || sizeof(Parcel) == 120);
+#ifdef __LP64__
+static_assert(sizeof(Parcel) == 120);
+#else
+static_assert(sizeof(Parcel) == 60);
+#endif
static std::atomic<size_t> gParcelGlobalAllocCount;
static std::atomic<size_t> gParcelGlobalAllocSize;