summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2017-07-25 08:38:03 +0300
committerTapani Pälli <[email protected]>2017-07-25 12:54:33 +0300
commit8dba6f8cf4d1f1d2dfd102c7ddc230995488247c (patch)
tree761885bc2abb1847fd3dd9754b1459b1e674b4c4 /src
parentdacb3197774623fd1b8738af89aa0bbc7ba1333b (diff)
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 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/util/hash_table.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/hash_table.c b/src/util/hash_table.c
index a9d442d6808..1bda2149b95 100644
--- a/src/util/hash_table.c
+++ b/src/util/hash_table.c
@@ -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);