mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-18 13:23:10 +08:00
libctf: fixes for systems on which sizeof (void *) > sizeof (long)
Systems like mingw64 have pointers that can only be represented by 'long long'. Consistently cast integers stored in pointers through uintptr_t to cater for this. libctf/ * ctf-create.c (ctf_dtd_insert): Add uintptr_t casts. (ctf_dtd_delete): Likewise. (ctf_dtd_lookup): Likewise. (ctf_rollback): Likewise. * ctf-hash.c (ctf_hash_lookup_type): Likewise. * ctf-types.c (ctf_lookup_by_rawhash): Likewise.
This commit is contained in:
@ -829,7 +829,7 @@ ctf_hash_lookup_type (ctf_hash_t *hp, ctf_file_t *fp __attribute__ ((__unused__)
|
||||
slot = ctf_hashtab_lookup ((struct htab *) hp, key, NO_INSERT);
|
||||
|
||||
if (slot)
|
||||
return (ctf_id_t) ((*slot)->value);
|
||||
return (ctf_id_t) (uintptr_t) ((*slot)->value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user