ValleyBell / libvgm

A more modular rewrite of most components from VGMPlay. will include sub-libraries for audio output, sound emulation and VGM playback
irc://irc.digibase.ca/#vgmrips
140 stars 33 forks source link

utils/OSThread_POSIX.c:98:9: error: incompatible pointer to integer conversion #117

Closed lanodan closed 9 months ago

lanodan commented 10 months ago

As far as I can tell this is specific to musl as it successfully compiles on my glibc desktop.

[87/103] /usr/lib/llvm/16/bin/clang  -I/var/tmp/portage/media-libs/libvgm-0_pre20230814/work/libvgm-079c4e737e6a73b38ae20125521d7d9eafda28e9  -O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC -Qunused-arguments -fPIC   -D VGM_LITTLE_ENDIAN -D HAVE_STDINT_H -MD -MT utils/CMakeFiles/vgm-utils.dir/OSThread_POSIX.c.o -MF utils/CMakeFiles/vgm-utils.dir/OSThread_POSIX.c.o.d -o utils/CMakeFiles/vgm-utils.dir/OSThread_POSIX.c.o -c /var/tmp/portage/media-libs/libvgm-0_pre20230814/work/libvgm-079c4e737e6a73b38ae20125521d7d9eafda28e9/utils/OSThread_POSIX.c
samu: job failed: /usr/lib/llvm/16/bin/clang  -I/var/tmp/portage/media-libs/libvgm-0_pre20230814/work/libvgm-079c4e737e6a73b38ae20125521d7d9eafda28e9  -O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC -Qunused-arguments -fPIC   -D VGM_LITTLE_ENDIAN -D HAVE_STDINT_H -MD -MT utils/CMakeFiles/vgm-utils.dir/OSThread_POSIX.c.o -MF utils/CMakeFiles/vgm-utils.dir/OSThread_POSIX.c.o.d -o utils/CMakeFiles/vgm-utils.dir/OSThread_POSIX.c.o -c /var/tmp/portage/media-libs/libvgm-0_pre20230814/work/libvgm-079c4e737e6a73b38ae20125521d7d9eafda28e9/utils/OSThread_POSIX.c
/var/tmp/portage/media-libs/libvgm-0_pre20230814/work/libvgm-079c4e737e6a73b38ae20125521d7d9eafda28e9/utils/OSThread_POSIX.c:98:9: error: incompatible pointer to integer conversion returning 'const pthread_t' (aka 'struct __pthread *const') from a function with result type 'UINT64' (aka 'unsigned long') [-Wint-conversion]
        return thr->id;
               ^~~~~~~
1 error generated.

(btw usually I'd try to fix it and send a patch but there's no license so I've to consider it All Rights Reserved)

ValleyBell commented 9 months ago

Thanks for the report. This should be fixed with 91b6542a25a754f985181921331bdcbb2699c03c.