diff options
author | Christopher N. Hesse <raymanfx@gmail.com> | 2016-02-20 03:05:53 +0100 |
---|---|---|
committer | Christopher N. Hesse <raymanfx@gmail.com> | 2016-02-20 03:10:19 +0100 |
commit | b0cda680c2aaa3cbc0ae080c51f8c21a3e93adb0 (patch) | |
tree | 190c325ddf284924689d9e4cb7ae4b56b5224e12 /libs | |
parent | 4711655682cfd85d0fc7d6462073917fd2ff2c64 (diff) | |
download | frameworks_native-b0cda680c2aaa3cbc0ae080c51f8c21a3e93adb0.zip frameworks_native-b0cda680c2aaa3cbc0ae080c51f8c21a3e93adb0.tar.gz frameworks_native-b0cda680c2aaa3cbc0ae080c51f8c21a3e93adb0.tar.bz2 |
binder: MemoryHeapIon: Fix size_t vs integer formatting mismatch
Change-Id: I58e4ce885bce5fc11f3e36f50a1060b682b4a512
Diffstat (limited to 'libs')
-rw-r--r-- | libs/binder/MemoryHeapIon.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/binder/MemoryHeapIon.cpp b/libs/binder/MemoryHeapIon.cpp index c547395..26c5566 100644 --- a/libs/binder/MemoryHeapIon.cpp +++ b/libs/binder/MemoryHeapIon.cpp @@ -116,10 +116,10 @@ MemoryHeapIon::MemoryHeapIon(size_t size, uint32_t flags, flagMask = ion_FlagMask_valid_check(flags); if (heapMask) { - ALOGD("MemoryHeapIon : Allocated with size:%d, heap:0x%X , flag:0x%X", size, heapMask, flagMask); + ALOGD("MemoryHeapIon : Allocated with size:%zu, heap:0x%X , flag:0x%X", size, heapMask, flagMask); fd = ion_alloc(mIonClient, size, 0, heapMask, flagMask); if (fd < 0) { - ALOGE("MemoryHeapIon : ION Reserve memory allocation failed(size[%u]) : %s", size, strerror(errno)); + ALOGE("MemoryHeapIon : ION Reserve memory allocation failed(size[%zu]) : %s", size, strerror(errno)); if (errno == ENOMEM) { // Out of reserve memory. So re-try allocating in system heap ALOGD("MemoryHeapIon : Re-try Allocating in default heap - SYSTEM heap"); fd = ion_alloc(mIonClient, size, 0, ION_HEAP_SYSTEM_MASK, ION_FLAG_CACHED | ION_FLAG_CACHED_NEEDS_SYNC | ION_FLAG_PRESERVE_KMAP); @@ -133,14 +133,14 @@ MemoryHeapIon::MemoryHeapIon(size_t size, uint32_t flags, flags = isReadOnly | heapMask | flagMask; if (fd < 0) { - ALOGE("MemoryHeapIon : ION memory allocation failed(size[%u]) : %s", size, strerror(errno)); + ALOGE("MemoryHeapIon : ION memory allocation failed(size[%zu]) : %s", size, strerror(errno)); } else { flags |= USE_ION_FD; base = ion_map(fd, size, 0); if (base != MAP_FAILED) { init(fd, base, size, flags, NULL); } else { - ALOGE("MemoryHeapIon : ION mmap failed(size[%u], fd[%d]) : %s", size, fd, strerror(errno)); + ALOGE("MemoryHeapIon : ION mmap failed(size[%zu], fd[%d]) : %s", size, fd, strerror(errno)); ion_free(fd); } } @@ -162,14 +162,14 @@ MemoryHeapIon::MemoryHeapIon(int fd, size_t size, uint32_t flags, if (fd >= 0) { dup_fd = dup(fd); if (dup_fd == -1) { - ALOGE("MemoryHeapIon : cannot dup fd (size[%u], fd[%d]) : %s", size, fd, strerror(errno)); + ALOGE("MemoryHeapIon : cannot dup fd (size[%zu], fd[%d]) : %s", size, fd, strerror(errno)); } else { flags |= USE_ION_FD; base = ion_map(dup_fd, size, 0); if (base != MAP_FAILED) { init(dup_fd, base, size, flags, NULL); } else { - ALOGE("MemoryHeapIon : ION mmap failed(size[%u], fd[%d]): %s", size, fd, strerror(errno)); + ALOGE("MemoryHeapIon : ION mmap failed(size[%zu], fd[%d]): %s", size, fd, strerror(errno)); ion_free(dup_fd); } } |