From 68e6f3b591d5a482332911dec7aee5c62aac464e Mon Sep 17 00:00:00 2001 From: Ryan Neph Date: Fri, 11 Feb 2022 14:56:46 -0800 Subject: proxy: fix void pointer cast errors or silence warnings depending on the compiler settings. Fixes: 9c5ca936 ("proxy: add proxy_context_resource helpers") Signed-off-by: Ryan Neph Reviewed-by: Yiwei Zhang --- src/proxy/proxy_context.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/proxy/proxy_context.c b/src/proxy/proxy_context.c index fcbc3743..7803771c 100644 --- a/src/proxy/proxy_context.c +++ b/src/proxy/proxy_context.c @@ -26,20 +26,20 @@ struct proxy_fence { static inline void proxy_context_resource_add(struct proxy_context *ctx, uint32_t res_id) { - assert(!_mesa_hash_table_search(ctx->resource_table, (void *)res_id)); - _mesa_hash_table_insert(ctx->resource_table, (void *)res_id, NULL); + assert(!_mesa_hash_table_search(ctx->resource_table, (void *)(uintptr_t)res_id)); + _mesa_hash_table_insert(ctx->resource_table, (void *)(uintptr_t)res_id, NULL); } static inline bool proxy_context_resource_find(struct proxy_context *ctx, uint32_t res_id) { - return _mesa_hash_table_search(ctx->resource_table, (void *)res_id); + return _mesa_hash_table_search(ctx->resource_table, (void *)(uintptr_t)res_id); } static inline void proxy_context_resource_remove(struct proxy_context *ctx, uint32_t res_id) { - _mesa_hash_table_remove_key(ctx->resource_table, (void *)res_id); + _mesa_hash_table_remove_key(ctx->resource_table, (void *)(uintptr_t)res_id); } static inline bool -- cgit v1.2.3