summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-03-24 11:03:03 +0100
committerMarge Bot <eric+marge@anholt.net>2020-03-25 14:19:37 +0000
commit411d7429c942bc878675ea390c9a5f1eff86ddc6 (patch)
tree17d2044df1011aa9a45fb6d6c8b94120742fa207
parent079cb4949dd3199ea5693cc0c6ac4c3d838ee022 (diff)
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 <brianp@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4297>
-rw-r--r--src/gallium/auxiliary/driver_rbug/rbug_core.c4
1 files changed, 2 insertions, 2 deletions
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 <errno.h>
-#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))