-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
Description
Hi
I'm trying to build 1.5.1 on Arch Linux and I'm getting this in my output:
make[1]: Entering directory '/tmp/naemon-naemon-core-611a5b6'
CC src/naemon/naemon-naemon.o
CC src/naemon/broker.lo
CC src/naemon/checks.lo
src/naemon/checks.c: In function 'parse_output':
src/naemon/checks.c:114:19: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
114 | p = strpbrk((const char *) tmp, "|");
| ^
src/naemon/checks.c:141:19: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
141 | p = strpbrk((const char *) tmp, "|");
| ^
cc1: all warnings being treated as errors
make[1]: *** [Makefile:2009: src/naemon/checks.lo] Error 1
make[1]: Leaving directory '/tmp/naemon-naemon-core-611a5b6'
make: *** [Makefile:1355: all] Error 2
I'm not sure of the RIGHT way to fix it. I was able to get the warnings to go away if I do this:
p = strpbrk(tmp, "|");
But there are more instances of this structure throughout the code and I'm not even sure if this is right.
bang = (char *)strchr(name, '!');
Help, please
Reactions are currently unavailable