Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible function pointer types build failure #66

Open
chenrui333 opened this issue Aug 8, 2024 · 1 comment
Open

incompatible function pointer types build failure #66

chenrui333 opened this issue Aug 8, 2024 · 1 comment

Comments

@chenrui333
Copy link

Seeing some build failures with clang 15

clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o dirt.o dirt.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o common.o common.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o audio.o audio.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o file.o file.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o server.o server.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o jobqueue.o jobqueue.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o thpool.o thpool.c
clang -O3 -g -I/usr/local/include -I/opt/local/include -Wall -std=gnu99 -DDEBUG -DHACK -DJACK -DSCALEPAN   -c -o jack.o jack.c
server.c:244:50: error: incompatible function pointer types passing 'int (const char *, const char *, lo_arg **, int, void *, void *)' to parameter of type 'lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') [-Wincompatible-function-pointer-types]
  lo_server_thread_add_method(st, "/play", NULL, play_handler, NULL);
                                                 ^~~~~~~~~~~~
/opt/homebrew/include/lo/lo_serverthread.h:151:72: note: passing argument to parameter 'h' here
                               const char *typespec, lo_method_handler h,
                                                                       ^
server.c:246:47: error: incompatible function pointer types passing 'int (const char *, const char *, lo_arg **, int, void *, void *)' to parameter of type 'lo_method_handler' (aka 'int (*)(const char *, const char *, lo_arg **, int, struct lo_message_ *, void *)') [-Wincompatible-function-pointer-types]
  lo_server_thread_add_method(st, NULL, NULL, generic_handler, NULL);
                                              ^~~~~~~~~~~~~~~
/opt/homebrew/include/lo/lo_serverthread.h:151:72: note: passing argument to parameter 'h' here
                               const char *typespec, lo_method_handler h,
                                                                       ^
2 errors generated.
@yaxu
Copy link
Member

yaxu commented Aug 21, 2024

I couldn't reproduce this under linux so it's a bit hard to fix. Does it compile with -Wno-error added to CFLAGS in the makefile?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants