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:
Nick Alcock 2020-07-21 15:38:08 +01:00
parent 734c894234
commit 8c419a91d7
4 changed files with 21 additions and 8 deletions

View file

@ -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;