libplist icon indicating copy to clipboard operation
libplist copied to clipboard

Get rid of casting a ptr to a 32 bit value

Open dmaclach opened this issue 3 years ago • 1 comments

This causes a warning if -Wbad-function-cast is enabled on a build.

Maybe I'm missing something because I can't see why the casts were there in the first place? This passes all the tests.

dmaclach avatar Nov 07 '21 06:11 dmaclach

The casts are there because the original values are uint32_t which are casted like this when added to the array:

ptr_array_add(bplist->used_indexes, (void*)(uintptr_t)node_index);

nikias avatar Feb 07 '22 10:02 nikias

Merged after rebase with e00615023c2108ba457a9089b900b14bbc9bb73b.

nikias avatar Sep 04 '22 23:09 nikias