cc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -O2 -g -D_REENTRANT -std=gnu89 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -Wdate-time -D_FORTIFY_SOURCE=2 -c -o pktrelay.o pktrelay.c
timer.c: In function ‘timer_init’:
timer.c:154:17: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
154 | exit(1);
| ^~~~
timer.c:12:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
11 | #include "hunt.h"
+++ |+#include <stdlib.h>
12 |
timer.c:154:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
154 | exit(1);
| ^~~~
timer.c:154:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
In file included from pktrelay.c:9:
hunt.h:410:5: warning: conflicting types for built-in function ‘log2’; expected ‘double(double)’ [-Wbuiltin-declaration-mismatch]
410 | int log2(unsigned int i);
| ^~~~
hunt.h:48:1: note: ‘log2’ is declared in header ‘<math.h>’
47 | #include "c/hash.h"
+++ |+#include <math.h>
48 |
pktrelay.c: In function ‘relay_add_item’:
pktrelay.c:270:44: warning: pointer targets in passing argument 4 of ‘menu_choose_host_mask_ports_dfl’ differ in signedness [-Wpointer-sign]
270 | &src_mask, src_ports, 0, 0, NULL) < 0)
| ^~~~~~~~~
| |
| int *
hunt.h:371:55: note: expected ‘unsigned int *’ but argument is of type ‘int *’
371 | unsigned int *ret_mask, unsigned int *ret_ports,
| ~~~~~~~~~~~~~~^~~~~~~~~ pktrelay.c:273:44: warning: pointer targets in passing argument 4 of ‘menu_choose_host_mask_ports_dfl’ differ in signedness [-Wpointer-sign]
273 | &dst_mask, dst_ports, 0, 0, NULL) < 0)
| ^~~~~~~~~
| |
| int *
hunt.h:371:55: note: expected ‘unsigned int *’ but argument is of type ‘int *’
371 | unsigned int *ret_mask, unsigned int *ret_ports,
| ~~~~~~~~~~~~~~^~~~~~~~~ pktrelay.c:294:20: warning: pointer targets in passing argument 1 of ‘port_htons’ differ in signedness [-Wpointer-sign]
294 | port_htons(src_ports);
| ^~~~~~~~~
| |
| int *
hunt.h:428:31: note: expected ‘unsigned int *’ but argument is of type ‘int *’
428 | void port_htons(unsigned int *db_ports);
| ~~~~~~~~~~~~~~^~~~~~~~
pktrelay.c:298:20: warning: pointer targets in passing argument 1 of ‘port_htons’ differ in signedness [-Wpointer-sign]
298 | port_htons(dst_ports);
| ^~~~~~~~~
| |
| int *
hunt.h:428:31: note: expected ‘unsigned int *’ but argument is of type ‘int *’
428 | void port_htons(unsigned int *db_ports);
| ~~~~~~~~~~~~~~^~~~~~~~
pktrelay.c: In function ‘relay_mod_item’:
pktrelay.c:334:49: warning: pointer targets in passing argument 4 of ‘menu_choose_host_mask_ports_dfl’ differ in signedness [-Wpointer-sign]
334 | &src_ip, &src_mask, src_ports,
| ^~~~~~~~~
| |
| int *
hunt.h:371:55: note: expected ‘unsigned int *’ but argument is of type ‘int *’
371 | unsigned int *ret_mask, unsigned int *ret_ports,
| ~~~~~~~~~~~~~~^~~~~~~~~ pktrelay.c:335:59: warning: pointer targets in passing argument 7 of ‘menu_choose_host_mask_ports_dfl’ differ in signedness [-Wpointer-sign]
335 | ri->src_addr, ri->src_mask, ri->src_ports) < 0)
| ~~^~~~~~~~~~~
| |
| unsigned int *
hunt.h:372:66: note: expected ‘int *’ but argument is of type ‘unsigned int *’
372 | unsigned int dfl_ip, unsigned int dfl_mask, int *dfl_ports);
| ~~~~~^~~~~~~~~
pktrelay.c:338:49: warning: pointer targets in passing argument 4 of ‘menu_choose_host_mask_ports_dfl’ differ in signedness [-Wpointer-sign]
338 | &dst_ip, &dst_mask, dst_ports,
| ^~~~~~~~~
| |
| int *
hunt.h:371:55: note: expected ‘unsigned int *’ but argument is of type ‘int *’
371 | unsigned int *ret_mask, unsigned int *ret_ports,
| ~~~~~~~~~~~~~~^~~~~~~~~ pktrelay.c:339:59: warning: pointer targets in passing argument 7 of ‘menu_choose_host_mask_ports_dfl’ differ in signedness [-Wpointer-sign]
339 | ri->dst_addr, ri->dst_mask, ri->dst_ports) < 0)
| ~~^~~~~~~~~~~
| |
| unsigned int *
hunt.h:372:66: note: expected ‘int *’ but argument is of type ‘unsigned int *’
372 | unsigned int dfl_ip, unsigned int dfl_mask, int *dfl_ports);
| ~~~~~^~~~~~~~~
pktrelay.c:367:20: warning: pointer targets in passing argument 1 of ‘port_htons’ differ in signedness [-Wpointer-sign]
367 | port_htons(src_ports);
| ^~~~~~~~~
| |
| int *
hunt.h:428:31: note: expected ‘unsigned int *’ but argument is of type ‘int *’
428 | void port_htons(unsigned int *db_ports);
| ~~~~~~~~~~~~~~^~~~~~~~
pktrelay.c:368:20: warning: pointer targets in passing argument 1 of ‘port_htons’ differ in signedness [-Wpointer-sign]
368 | port_htons(dst_ports);
| ^~~~~~~~~
| |
| int *
hunt.h:428:31: note: expected ‘unsigned int *’ but argument is of type ‘int *’
428 | void port_htons(unsigned int *db_ports);
| ~~~~~~~~~~~~~~^~~~~~~~
pktrelay.c: In function ‘relay_item_print’:
pktrelay.c:225:30: warning: ‘%s’ directive writing up to 511 bytes into a region of size 508 [-Wformat-overflow=]
225 | sprintf(buf, "%s/%d [%s]", host_lookup(ri->src_addr, hl_mode),
| ^~
226 | count_mask(ri->src_mask), buf_src_ports);
| ~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:906,
from pktrelay.c:12:
In function ‘sprintf’,
inlined from ‘relay_item_print’ at pktrelay.c:225:2: /usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output 6 or more bytes (assuming 517) into a destination of size 512
30 | return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31 | __glibc_objsize (__s), __fmt,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [<builtin>: timer.o] Error 1
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 06:05:15 |
Calls: | 6,706 |
Files: | 12,236 |
Messages: | 5,350,563 |