[Piglit] [PATCH] util: fix MSVC build failure in piglit_ktx.c
Jose Fonseca
jfonseca at vmware.com
Tue Jul 31 11:31:19 PDT 2012
Looks good. Thanks Brian.
Jose
----- Original Message -----
> 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
> ---
> tests/util/piglit_ktx.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c
> index 13a3d91..4c67489 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;
> --
> 1.7.3.4
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
More information about the Piglit
mailing list