[Mesa-dev] [PATCH 1/6] st/draw: silence Mingw warning in pointer_to_offset()
Ian Romanick
idr at freedesktop.org
Tue Nov 5 09:01:49 PST 2013
On 10/29/2013 01:11 PM, Brian Paul wrote:
> Fixes "warning: cast from pointer to integer of different size" for
> 64-bit builds.
> ---
> src/mesa/state_tracker/st_draw.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
> index 3313fc8..394473b 100644
> --- a/src/mesa/state_tracker/st_draw.h
> +++ b/src/mesa/state_tracker/st_draw.h
> @@ -77,7 +77,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
> static INLINE unsigned
> pointer_to_offset(const void *ptr)
> {
> - return (unsigned) (((unsigned long) ptr) & 0xffffffffUL);
> + return (unsigned) (((GLsizeiptr) ptr) & 0xffffffffUL);
Would it be better to just use uintptr_t?
> }
>
>
More information about the mesa-dev
mailing list