diff options
author | Ryan Neph <ryanneph@google.com> | 2022-02-11 14:56:46 -0800 |
---|---|---|
committer | Ryan Neph <ryanneph@google.com> | 2022-02-11 15:36:21 -0800 |
commit | 68e6f3b591d5a482332911dec7aee5c62aac464e (patch) | |
tree | 426f660307b24ce718727fe0cabc08b1594e0faf | |
parent | 06240496bf281caac21baefadd05075238535d97 (diff) | |
download | virglrenderer-68e6f3b591d5a482332911dec7aee5c62aac464e.tar.gz |
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 <ryanneph@google.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
-rw-r--r-- | src/proxy/proxy_context.c | 8 |
1 files 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 |