vbo: fix build errors on android
authorTapani Pälli <tapani.palli@intel.com>
Mon, 4 Sep 2017 05:02:13 +0000 (08:02 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Tue, 5 Sep 2017 04:55:34 +0000 (07:55 +0300)
incompatible pointer to integer conversion assigning to 'GLintptr' (aka 'int')
from 'const char *' [-Werror,-Wint-conversion]

      offset = indices;
             ^ ~~~~~~~

Fixes: 2d93b462b4d ("vbo: fix offset in minmax cache key")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
src/mesa/vbo/vbo_minmax_index.c

index 58a2af49aca7d5d9ae169890ee2a3357f4f4e483..1377926bbab23972e6e0dbdd162fab95f7718cff 100644 (file)
@@ -255,7 +255,7 @@ vbo_get_minmax_index(struct gl_context *ctx,
                                 count, min_index, max_index))
          return;
 
-      offset = indices;
+      offset = (GLintptr) indices;
       indices = ctx->Driver.MapBufferRange(ctx, offset, size,
                                            GL_MAP_READ_BIT, ib->obj,
                                            MAP_INTERNAL);