summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Dave MacLachlan2021-11-06 23:04:54 -0700
committerGravatar Nikias Bassen2022-09-05 01:25:07 +0200
commite00615023c2108ba457a9089b900b14bbc9bb73b (patch)
tree560529aaa490b704f9799e9f5d51a54105ff8474 /src
parentbaa84628accad00256d0ff929026f3d279eb5e89 (diff)
downloadlibplist-e00615023c2108ba457a9089b900b14bbc9bb73b.tar.gz
libplist-e00615023c2108ba457a9089b900b14bbc9bb73b.tar.bz2
Get rid of casting a ptr to a 32 bit value
This causes a warning if `-Wbad-function-cast` is enabled on a build.
Diffstat (limited to 'src')
-rw-r--r--src/bplist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bplist.c b/src/bplist.c
index c8f5ebc..851ecd6 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -758,8 +758,8 @@ static plist_t parse_bin_node_at_index(struct bplist_data *bplist, uint32_t node
/* recursion check */
if (bplist->level > 0) {
for (i = bplist->level-1; i >= 0; i--) {
- uint32_t node_i = (uint32_t)(uintptr_t)ptr_array_index(bplist->used_indexes, i);
- uint32_t node_level = (uint32_t)(uintptr_t)ptr_array_index(bplist->used_indexes, bplist->level);
+ void *node_i = ptr_array_index(bplist->used_indexes, i);
+ void *node_level = ptr_array_index(bplist->used_indexes, bplist->level);
if (node_i == node_level) {
PLIST_BIN_ERR("recursion detected in binary plist\n");
return NULL;