Mesa (master): gallium: fix a warning
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 14 11:18:56 UTC 2020
Module: Mesa
Branch: master
Commit: fcdd3c866bac6aaabef7057519931f675df156fc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fcdd3c866bac6aaabef7057519931f675df156fc
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Sep 23 13:36:45 2019 +0200
gallium: fix a warning
On some platforms (like Win64), unsigned long is 32-bit, so the first
cast doesn't do anything, and the compiler complains about an implicit
cast to a smaller type. So let's cast to an uintptr_t instead first,
as that's large enough on all platforms.
Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/gallium/auxiliary/util/u_debug_flush.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/auxiliary/util/u_debug_flush.c b/src/gallium/auxiliary/util/u_debug_flush.c
index cc60ab1d7b7..fdb06ac92de 100644
--- a/src/gallium/auxiliary/util/u_debug_flush.c
+++ b/src/gallium/auxiliary/util/u_debug_flush.c
@@ -111,7 +111,7 @@ debug_flush_pointer_compare(void *key1, void *key2)
static unsigned
debug_flush_pointer_hash(void *key)
{
- return (unsigned) (unsigned long) key;
+ return (unsigned) (uintptr_t) key;
}
struct debug_flush_buf *
More information about the mesa-commit
mailing list