diff options
author | SangWook Han <sangwook.han@gmail.com> | 2012-07-15 22:42:28 +0900 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2012-07-18 17:13:24 -0700 |
commit | b210a9f9c7ae17e2028a86d9a4e9a3b35472862a (patch) | |
tree | d6d5fc91ee67d127e63223782ad10bdf7b4af3ed /libdex/SysUtil.cpp | |
parent | fd9491c5ea82e91d0085679caa82195bb5b4d17b (diff) | |
download | android_dalvik-b210a9f9c7ae17e2028a86d9a4e9a3b35472862a.tar.gz android_dalvik-b210a9f9c7ae17e2028a86d9a4e9a3b35472862a.tar.bz2 android_dalvik-b210a9f9c7ae17e2028a86d9a4e9a3b35472862a.zip |
Use uintptr_t for cast pointer to integer.
On 64bit host, sizeof pointer is not equal to sizeof int/u4.
Need for host tools.
Change-Id: Id8d9418787e79523226b9c9e3f67277f9ac7c6aa
Diffstat (limited to 'libdex/SysUtil.cpp')
-rw-r--r-- | libdex/SysUtil.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libdex/SysUtil.cpp b/libdex/SysUtil.cpp index a412a12c4..456d26ec4 100644 --- a/libdex/SysUtil.cpp +++ b/libdex/SysUtil.cpp @@ -331,7 +331,7 @@ int sysChangeMapAccess(void* addr, size_t length, int wantReadWrite, * (The address must be page-aligned, the length doesn't need to be, * but we do need to ensure we cover the same range.) */ - u1* alignAddr = (u1*) ((int) addr & ~(SYSTEM_PAGE_SIZE-1)); + u1* alignAddr = (u1*) ((uintptr_t) addr & ~(SYSTEM_PAGE_SIZE-1)); size_t alignLength = length + ((u1*) addr - alignAddr); //ALOGI("%p/%zd --> %p/%zd", addr, length, alignAddr, alignLength); |