[Mesa-dev] [PATCH] util/rb_tree: Fix a compiler warning
Caio Marcelo de Oliveira Filho
caio.oliveira at intel.com
Thu Jul 12 17:23:56 UTC 2018
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
On Wed, Jul 11, 2018 at 10:49:49PM -0700, Jason Ekstrand wrote:
> Gcc 8 warns "cast to pointer from integer of different size" in 32-bit
> builds.
> ---
> 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 e8750b32d0e..c77e9255ea2 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.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list