cc -c -o gopher.filter.dpi.o gopher.filter.dpi.c gopher.filter.dpi.c:222:36: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat] 222 | printf("
%*s%*s", indent, "");
| ~~^ ~~~~~~
gopher.filter.dpi.c:257:14: warning: field width should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
257 | printf("\n%*s%s %*s", key);
| ~~~ ^~~
| %3s
dpi.c:26:35: warning: format specifies type 'unsigned int *' but the argument has type 'char *' [-Wformat]
26 | rc = sscanf(keys, "%*d %4x' '>", local_key);
| ~~~ ^~~~~~~~~
| %3s
dpi.c:27:34: warning: field precision should have type 'int', but argument has type 'ssize_t' (aka 'long') [-Wformat]
27 | if (rc < 0) err(1, "comm key: %.*s", sz, keys);
| ~~^~ ~~
dpi.c:28:35: warning: field precision should have type 'int', but argument has type 'ssize_t' (aka 'long') [-Wformat]
28 | if (rc < 1) errx(1, "comm key: %.*s", sz, keys);
| ~~^~ ~~
dpi.c:18:2: warning: array index 30 is past the end of the array (that has type 'char[30]') [-Warray-bounds]
18 | buf[30] = '\0';
| ^ ~~
dpi.c:10:2: note: array 'buf' declared here
10 | char buf[30];
| ^
dpi.c:41:31: warning: field precision should have type 'int', but argument has type 'unsigned long' [-Wformat]
41 | err(1, "bad open_url cmd: %.*s", sizeof(buf), buf);
| ~~^~ ~~~~~~~~~~~
dpi.c:51:26: warning: field precision should have type 'int', but argument has type 'size_t' (aka 'unsigned long') [-Wformat]
51 | err(1, "bad url end: %.*s", len, url_buf);
| ~~^~ ~~~
7 warnings generated.
cc gopher.filter.dpi.o io.o dpi.o -o gopher.filter.dpi
ld: warning: gopher.filter.dpi.c(gopher.filter.dpi.o:(respond)): warning: strcpy() is almost always misused, please use strlcpy()