From 4321bf040bb53a155a4bcc2282a26a84769a963f Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Tue, 20 Feb 2018 17:50:43 +0900 Subject: [PATCH] tzip: revert "fix type size mismatching issue" There is no difference in asembler on 32 bit machine before and after modification. ///////////////////////////////////////////////////// 0001f6d0 : 1f6d0: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} 1f6d4: 4606 mov r6, r0 1f6d6: 4840 ldr r0, [pc, #256] ; (1f7d8 ) 1f6d8: b085 sub sp, #20 1f6da: 460d mov r5, r1 1f6dc: 4478 add r0, pc 1f6de: af04 add r7, sp, #16 1f6e0: 4671 mov r1, lr 1f6e2: 4674 mov r4, lr 1f6e4: f7f0 fb1c bl fd20 <__cyg_profile_func_enter@@Base> 1f6e8: 2e00 cmp r6, #0 1f6ea: d057 beq.n 1f79c 1f6ec: b125 cbz r5, 1f6f8 1f6ee: e9d5 8904 ldrd r8, r9, [r5, #16] 1f6f2: ea58 0309 orrs.w r3, r8, r9 //////////////////////////////////////////////////////////// Signed-off-by: INSUN PYO Change-Id: Idf720210ac1012cc3aa3996b740718cf9ad94332 --- src/tzip/tzip.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/src/tzip/tzip.c b/src/tzip/tzip.c index e090719..b73fe98 100644 --- a/src/tzip/tzip.c +++ b/src/tzip/tzip.c @@ -292,12 +292,8 @@ static int tzip_open(const char *path, struct fuse_file_info *fi) if (sem_init(&handle->lock, 0, 1) == -1) _E("sem_init failed"); -#ifdef ARCH_32BIT - int hd = (int)handle; - fi->fh = (uint64_t)hd; -#else - fi->fh = (uint64_t)handle; -#endif + fi->fh = (uint64_t)(unsigned long)handle; + return 0; out_unlock: @@ -326,12 +322,7 @@ static int tzip_read(const char *path, char *buf, size_t size, off_t offset, return -EINVAL; } -#ifdef ARCH_32BIT - int hd = (int)fi->fh; - handle = (struct tzip_handle *)hd; -#else - handle = (struct tzip_handle *)(fi->fh); -#endif + handle = (struct tzip_handle *)(unsigned long)(fi->fh); _D("Read - Path : %s size : %zd offset : %jd ", path, size, offset); sem_wait(&handle->lock); @@ -354,12 +345,7 @@ static int tzip_release(const char *path, struct fuse_file_info *fi) return -EINVAL; } -#ifdef ARCH_32BIT - int hd = (int)fi->fh; - handle = (struct tzip_handle *)hd; -#else - handle = (struct tzip_handle *)(fi->fh); -#endif + handle = (struct tzip_handle *)(unsigned long)(fi->fh); if (sem_destroy(&handle->lock) == -1) _E("sem_destroy failed"); -- 2.7.4