As far as I understand, calling a function via incompatible function pointers (even if the argument types are compatible) is undefined behaviour.
A related (but for c++) question discussed here: https://stackoverflow.com/questions/43220926/call-to-function-unknown-through-pointer-to-incorrect-function-type
Would it be possible to fix this somehow?
libslack/msg.c:357:4: runtime error: call to function msg_fddata_release through pointer to incorrect function type 'void (*)(void *)'
~/repos/daemon/libslack/msg.c:514: note: msg_fddata_release defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libslack/msg.c:357:4
libslack/list.c:340:4: runtime error: call to function str_release through pointer to incorrect function type 'void (*)(void *)'
~/repos/daemon/libslack/str.c:874: note: str_release defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior libslack/list.c:340:4
As far as I understand, calling a function via incompatible function pointers (even if the argument types are compatible) is undefined behaviour.
A related (but for c++) question discussed here: https://stackoverflow.com/questions/43220926/call-to-function-unknown-through-pointer-to-incorrect-function-type
Would it be possible to fix this somehow?