Module: Mesa
Branch: master
Commit: ccb8309516792fedd4ed50f8db81d84682b967c3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=ccb8309516792fedd4ed50f8db81d84682b967c3

Author: Jason Ekstrand <jason.ekstr...@intel.com>
Date:   Wed Jul 11 17:06:26 2018 -0700

util/rb_tree: Fix a compiler warning

Gcc 8 warns "cast to pointer from integer of different size" in 32-bit
builds.

Reviewed-by: Caio Marcelo de Oliveira Filho <caio.olive...@intel.com>

---

 src/util/rb_tree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/rb_tree.h b/src/util/rb_tree.h
index e8750b32d0..c77e9255ea 100644
--- a/src/util/rb_tree.h
+++ b/src/util/rb_tree.h
@@ -55,7 +55,7 @@ struct rb_node {
 static inline struct rb_node *
 rb_node_parent(struct rb_node *n)
 {
-    return (struct rb_node *)(n->parent & ~1ull);
+    return (struct rb_node *)(n->parent & ~(uintptr_t)1);
 }
 
 /** A red-black tree

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to