aboutsummaryrefslogtreecommitdiff
path: root/libctf/ctf-types.c
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2020-07-21 15:38:08 +0100
committerNick Alcock <nick.alcock@oracle.com>2020-07-22 18:05:32 +0100
commit8c419a91d761989b824d1bbe3b4575068317181e (patch)
treec5876fb9131c7d553ea9503b862906533899c957 /libctf/ctf-types.c
parent734c894234e800c924d97ae69d4774c9b00797dd (diff)
downloadgdb-8c419a91d761989b824d1bbe3b4575068317181e.zip
gdb-8c419a91d761989b824d1bbe3b4575068317181e.tar.gz
gdb-8c419a91d761989b824d1bbe3b4575068317181e.tar.bz2
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.
Diffstat (limited to 'libctf/ctf-types.c')
-rw-r--r--libctf/ctf-types.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libctf/ctf-types.c b/libctf/ctf-types.c
index ddcca66..4843de3 100644
--- a/libctf/ctf-types.c
+++ b/libctf/ctf-types.c
@@ -658,7 +658,7 @@ ctf_id_t ctf_lookup_by_rawhash (ctf_file_t *fp, ctf_names_t *np, const char *nam
ctf_id_t id;
if (fp->ctf_flags & LCTF_RDWR)
- id = (ctf_id_t) ctf_dynhash_lookup (np->ctn_writable, name);
+ id = (ctf_id_t) (uintptr_t) ctf_dynhash_lookup (np->ctn_writable, name);
else
id = ctf_hash_lookup_type (np->ctn_readonly, fp, name);
return id;