mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
util: fix warning/error on 32bit build
Add uintptr_t cast to fix 'cast to pointer from integer of different size' warning on 32bit build (build error on Android M). Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
dacb319777
commit
8dba6f8cf4
1 changed files with 2 additions and 2 deletions
|
|
@ -588,7 +588,7 @@ _mesa_hash_table_u64_insert(struct hash_table_u64 *ht, uint64_t key,
|
|||
}
|
||||
|
||||
if (sizeof(void *) == 8) {
|
||||
_mesa_hash_table_insert(ht->table, (void *)key, data);
|
||||
_mesa_hash_table_insert(ht->table, (void *)(uintptr_t)key, data);
|
||||
} else {
|
||||
struct hash_key_u64 *_key = CALLOC_STRUCT(hash_key_u64);
|
||||
|
||||
|
|
@ -604,7 +604,7 @@ static struct hash_entry *
|
|||
hash_table_u64_search(struct hash_table_u64 *ht, uint64_t key)
|
||||
{
|
||||
if (sizeof(void *) == 8) {
|
||||
return _mesa_hash_table_search(ht->table, (void *)key);
|
||||
return _mesa_hash_table_search(ht->table, (void *)(uintptr_t)key);
|
||||
} else {
|
||||
struct hash_key_u64 _key = { .value = key };
|
||||
return _mesa_hash_table_search(ht->table, &_key);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue