Open jelmer opened 5 years ago
I might have to dig in to this and see if I can come up with a solution.
Hi,
You can disable the error for this by modifying the Makefile
so that the CFLAGS includes -Wno-cast-function-type
:
CFLAGS=-std=gnu11 -Wall -Wextra -Werror -g -O2 $(IRSSI_CFLAGS) $(QUASSELC_FLAGS) -Wmissing-prototypes -Wmissing-declarations -Wno-cast-function-type
I am unfamiliar with the code, so I'm not sure whether this is safe to do, but it will then build, load, and connect. (I then get user type errors and crashes, but that's another issue...)
blodeuwedd:~/src/quassel-irssi%
make -C coremake: Entering directory '/home/jelmer/src/quassel-irssi/core' cc -std=gnu11 -Wall -Wextra -Werror -g -O2 -I/usr/include/irssi//src/ -I/usr/include/irssi//src/core/ -I/usr/include/irssi//src/fe-common/ -I/usr/include/irssi//src/fe-common/core/ -I/usr/include/irssi//src/fe-text/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -DUOFF_T_LONG -fPIC -DHAVE_OPENSSL -Ilib -Wmissing-prototypes -Wmissing-declarations -c -o quassel-net.o quassel-net.c quassel-net.c: In function ‘sig_connected’: quassel-net.c:110:8: error: cast between incompatible function types from ‘void ()(Quassel_SERVER_REC )’ {aka ‘void ()(struct Quassel_SERVER_REC_s )’} to ‘void ()(void , GIOChannel , int)’ {aka ‘void ()(void , struct _GIOChannel , int)’} [-Werror=cast-function-type] (GInputFunction) quassel_parse_incoming, r); ^ In file included from /usr/include/irssi//src/core/commands.h:4, from quassel-net.c:25: quassel-net.c: In function ‘quassel_net_init’: quassel-net.c:161:39: error: cast between incompatible function types from ‘void ()(Quassel_SERVER_REC )’ {aka ‘void ()(struct Quassel_SERVER_REC_s )’} to ‘void ()(const void , const void , const void , const void , const void , const void *)’ [-Werror=cast-function-type] signal_add_first("server connected", (SIGNAL_FUNC) sig_connected); ^ /usr/include/irssi//src/core/signals.h:23:78: note: in definition of macro ‘signal_add_first’ signal_add_full(MODULE_NAME, SIGNAL_PRIORITY_HIGH, (signal), (SIGNAL_FUNC) (func), NULL) ^~~~ cc1: all warnings being treated as errors make: *** [