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

Fails to build with gcc-8 #32

Open
jelmer opened this issue Oct 7, 2018 · 2 comments
Open

Fails to build with gcc-8 #32

jelmer opened this issue Oct 7, 2018 · 2 comments

Comments

@jelmer
Copy link
Contributor

jelmer commented Oct 7, 2018

blodeuwedd:~/src/quassel-irssi% make -C core
make: 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: *** [: quassel-net.o] Error 1
make: Leaving directory '/home/jelmer/src/quassel-irssi/core'
`

@dabbill
Copy link

dabbill commented Jan 7, 2019

I might have to dig in to this and see if I can come up with a solution.

@arfonzocoward
Copy link

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...)

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

3 participants