From: Erik Faye-Lund Date: Tue, 24 Mar 2020 10:03:03 +0000 (+0100) Subject: rbug: clean up cast-warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=411d7429c942bc878675ea390c9a5f1eff86ddc6;p=mesa.git rbug: clean up cast-warnings Similarly to the previous cast; on 64-bit Windows, unsigned long is 32-bit, and casting a pointer to a non-matchin bit-width integer produce warnings. So let's use uintpre_t for this purpose instead. Reviewed-by: Brian Paul Part-of: --- diff --git a/src/gallium/auxiliary/driver_rbug/rbug_core.c b/src/gallium/auxiliary/driver_rbug/rbug_core.c index d8dda8af227..53cc941c2ca 100644 --- a/src/gallium/auxiliary/driver_rbug/rbug_core.c +++ b/src/gallium/auxiliary/driver_rbug/rbug_core.c @@ -44,8 +44,8 @@ #include -#define U642VOID(x) ((void *)(unsigned long)(x)) -#define VOID2U64(x) ((uint64_t)(unsigned long)(x)) +#define U642VOID(x) ((void *)(uintptr_t)(x)) +#define VOID2U64(x) ((uint64_t)(uintptr_t)(x)) #define container_of(ptr, type, field) \ (type*)((char*)ptr - offsetof(type, field))