From ccb8309516792fedd4ed50f8db81d84682b967c3 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 11 Jul 2018 17:06:26 -0700 Subject: [PATCH] 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 --- 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 e8750b3..c77e925 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 -- 2.7.4