summaryrefslogtreecommitdiffstats
path: root/libs/binder/IMemory.cpp
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2014-02-05 17:42:44 -0800
committerColin Cross <ccross@android.com>2014-02-05 17:51:10 -0800
commit6f4f3ab36c5ed1df84eb3a9f7475f0ac42952f58 (patch)
tree9ab9e8430032dbe04e7f8e70fcea0f5872fb9ae2 /libs/binder/IMemory.cpp
parent055dac1b54af46a0608b32e83fcae45e75a4a8f0 (diff)
downloadframeworks_native-6f4f3ab36c5ed1df84eb3a9f7475f0ac42952f58.zip
frameworks_native-6f4f3ab36c5ed1df84eb3a9f7475f0ac42952f58.tar.gz
frameworks_native-6f4f3ab36c5ed1df84eb3a9f7475f0ac42952f58.tar.bz2
binder: fix all warnings
Fix warnings related to casting pointers to ints, using %d or %ld to print size_t/ssize_t, and unused parameters. Change-Id: I7a13ba83d402952989c1f795cd9e880a95b98d9e
Diffstat (limited to 'libs/binder/IMemory.cpp')
-rw-r--r--libs/binder/IMemory.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/binder/IMemory.cpp b/libs/binder/IMemory.cpp
index 07cb41a..d8ed995 100644
--- a/libs/binder/IMemory.cpp
+++ b/libs/binder/IMemory.cpp
@@ -244,7 +244,7 @@ BpMemoryHeap::~BpMemoryHeap() {
sp<IBinder> binder = const_cast<BpMemoryHeap*>(this)->asBinder();
if (VERBOSE) {
- ALOGD("UNMAPPING binder=%p, heap=%p, size=%d, fd=%d",
+ ALOGD("UNMAPPING binder=%p, heap=%p, size=%zu, fd=%d",
binder.get(), this, mSize, mHeapId);
CallStack stack(LOG_TAG);
}
@@ -296,11 +296,11 @@ void BpMemoryHeap::assertReallyMapped() const
uint32_t flags = reply.readInt32();
uint32_t offset = reply.readInt32();
- ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(err, "binder=%p transaction failed fd=%d, size=%zd, err=%d (%s)",
asBinder().get(), parcel_fd, size, err, strerror(-err));
int fd = dup( parcel_fd );
- ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%ld, err=%d (%s)",
+ ALOGE_IF(fd==-1, "cannot dup fd=%d, size=%zd, err=%d (%s)",
parcel_fd, size, err, strerror(errno));
int access = PROT_READ;
@@ -313,7 +313,7 @@ void BpMemoryHeap::assertReallyMapped() const
mRealHeap = true;
mBase = mmap(0, size, access, MAP_SHARED, fd, offset);
if (mBase == MAP_FAILED) {
- ALOGE("cannot map BpMemoryHeap (binder=%p), size=%ld, fd=%d (%s)",
+ ALOGE("cannot map BpMemoryHeap (binder=%p), size=%zd, fd=%d (%s)",
asBinder().get(), size, fd, strerror(errno));
close(fd);
} else {
@@ -402,7 +402,7 @@ sp<IMemoryHeap> HeapCache::find_heap(const sp<IBinder>& binder)
if (i>=0) {
heap_info_t& info = mHeapCache.editValueAt(i);
ALOGD_IF(VERBOSE,
- "found binder=%p, heap=%p, size=%d, fd=%d, count=%d",
+ "found binder=%p, heap=%p, size=%zu, fd=%d, count=%d",
binder.get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
@@ -435,7 +435,7 @@ void HeapCache::free_heap(const wp<IBinder>& binder)
int32_t c = android_atomic_dec(&info.count);
if (c == 1) {
ALOGD_IF(VERBOSE,
- "removing binder=%p, heap=%p, size=%d, fd=%d, count=%d",
+ "removing binder=%p, heap=%p, size=%zu, fd=%d, count=%d",
binder.unsafe_get(), info.heap.get(),
static_cast<BpMemoryHeap*>(info.heap.get())->mSize,
static_cast<BpMemoryHeap*>(info.heap.get())->mHeapId,
@@ -466,7 +466,7 @@ void HeapCache::dump_heaps()
for (int i=0 ; i<c ; i++) {
const heap_info_t& info = mHeapCache.valueAt(i);
BpMemoryHeap const* h(static_cast<BpMemoryHeap const *>(info.heap.get()));
- ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%d)",
+ ALOGD("hey=%p, heap=%p, count=%d, (fd=%d, base=%p, size=%zu)",
mHeapCache.keyAt(i).unsafe_get(),
info.heap.get(), info.count,
h->mHeapId, h->mBase, h->mSize);