From 1c13336c1c5d1310087ebb191eaefd9e452ae822 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 31 Jul 2012 10:57:22 -0600 Subject: util: fix MSVC build failure in piglit_ktx.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using void pointers for pointer arithmetic doesn't work. Fixes: tests\util\piglit_ktx.c(333) : error C2036: 'void *' : unknown size Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53013 Reviewed-by: Chad Versace Reviewed-by: José Fonseca --- tests/util/piglit_ktx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c index 13a3d9118..4c6748963 100644 --- a/tests/util/piglit_ktx.c +++ b/tests/util/piglit_ktx.c @@ -325,7 +325,7 @@ piglit_ktx_parse_images(struct piglit_ktx *self) /* Begin parsing first image. */ image = &self->images[0]; -#define CUR_SIZE ((void*) p.u8 - self->data) +#define CUR_SIZE (p.u8 - (uint8_t *) self->data) for (miplevel = 0; miplevel < info->num_miplevels; ++miplevel) { uint32_t image_size; -- cgit v1.2.3