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>
This commit is contained in:
Erik Faye-Lund 2020-03-24 11:03:03 +01:00 committed by Marge Bot
parent 079cb4949d
commit 411d7429c9

View file

@ -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))