Pixelflinger: Fix issue of pointers being stored in ints
Pixelflinger's code makes assumptions, at certain places,
that pointers can be stored as ints. This patch makes use
of uintptr_t wherever pointers are stored as int or cast
to int.
Change-Id: Ie76f425cbc82ac038a747f77a95bd31774f4a8e8
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
diff --git a/include/private/pixelflinger/ggl_context.h b/include/private/pixelflinger/ggl_context.h
index 4864d5a..17bb3ed 100644
--- a/include/private/pixelflinger/ggl_context.h
+++ b/include/private/pixelflinger/ggl_context.h
@@ -121,7 +121,7 @@
template<> struct CTA<true> { };
#define GGL_CONTEXT(con, c) context_t *con = static_cast<context_t *>(c)
-#define GGL_OFFSETOF(field) int(&(((context_t*)0)->field))
+#define GGL_OFFSETOF(field) uintptr_t(&(((context_t*)0)->field))
#define GGL_INIT_PROC(p, f) p.f = ggl_ ## f;
#define GGL_BETWEEN(x, L, H) (uint32_t((x)-(L)) <= ((H)-(L)))
@@ -480,7 +480,7 @@
uint32_t width;
uint32_t height;
uint32_t stride;
- int32_t data;
+ uintptr_t data;
int32_t dsdx;
int32_t dtdx;
int32_t spill[2];