From 0da7ab65c6faaf7c8c39edf3612206703997334b Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 5 Feb 2014 18:09:45 -0800 Subject: jpeg: fix compiling for 64-bit Cast pointers to uintptr_t instead of int to test alignment. Change-Id: If959132a4bc52a151bcbe03702b24f4a202bfb1c --- jmorecfg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jmorecfg.h b/jmorecfg.h index 71cb393..66116db 100644 --- a/jmorecfg.h +++ b/jmorecfg.h @@ -22,7 +22,7 @@ #ifdef ANDROID_RGB #define PACK_SHORT_565(r,g,b) ((((r)<<8)&0xf800)|(((g)<<3)&0x7E0)|((b)>>3)) #define PACK_TWO_PIXELS(l,r) ((r<<16) | l) -#define PACK_NEED_ALIGNMENT(ptr) (((int)(ptr))&3) +#define PACK_NEED_ALIGNMENT(ptr) (((uintptr_t)(ptr))&3) #define WRITE_TWO_PIXELS(addr, pixels) do { \ ((INT16*)(addr))[0] = (pixels); \ ((INT16*)(addr))[1] = (pixels)>>16; \ -- cgit v1.2.3