gcc -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -W -Wall -Wdate-time -D_FORTIFY_SOURCE=2 -Dlint -I. -I.. -c com-config.c
com-config.c: In function ‘config_line’:
com-config.c:161:17: error: implicit declaration of function ‘memset’ [-Werror=implicit-function-declaration]
161 | memset(line, 0, sizeof(line));
| ^~~~~~
com-config.c:59:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’
58 | #include "com-syslog.h"
+++ |+#include <string.h>
59 |
com-config.c:161:17: warning: incompatible implicit declaration of built-in function ‘memset’ [-Wbuiltin-declaration-mismatch]
161 | memset(line, 0, sizeof(line));
| ^~~~~~
com-config.c:161:17: note: include ‘<string.h>’ or provide a declaration of ‘memset’
com-config.c:167:29: error: implicit declaration of function ‘fgets’ [-Werror=implicit-function-declaration]
167 | if (fgets(line + len, sizeof(line) - len,
| ^~~~~
com-config.c:168:61: warning: comparison between pointer and integer
168 | fp) == NULL) {
| ^~ com-config.c:181:33: error: implicit declaration of function ‘memmove’ [-Werror=implicit-function-declaration]
181 | memmove(line + len, p, strlen(p) + 1);
| ^~~~~~~
com-config.c:181:33: note: include ‘<string.h>’ or provide a declaration of ‘memmove’
com-config.c:181:33: warning: incompatible implicit declaration of built-in function ‘memmove’ [-Wbuiltin-declaration-mismatch]
com-config.c:181:33: note: include ‘<string.h>’ or provide a declaration of ‘memmove’
com-config.c:181:56: error: implicit declaration of function ‘strlen’ [-Werror=implicit-function-declaration]
181 | memmove(line + len, p, strlen(p) + 1);
| ^~~~~~ com-config.c:181:56: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
com-config.c:181:56: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
com-config.c:181:56: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
com-config.c:187:34: error: implicit declaration of function ‘strchr’ [-Werror=implicit-function-declaration]
187 | if ((p = strchr(line, '\n')) != NULL)
| ^~~~~~
com-config.c:187:34: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
com-config.c:187:34: warning: incompatible implicit declaration of built-in function ‘strchr’ [-Wbuiltin-declaration-mismatch]
com-config.c:187:34: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
com-config.c:193:36: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch]
193 | if ((len = strlen(line)) == 0)
| ^~~~~~
com-config.c:193:36: note: include ‘<string.h>’ or provide a declaration of ‘strlen’
com-config.c: In function ‘config_read’:
com-config.c:253:17: error: implicit declaration of function ‘atexit’ [-Werror=implicit-function-declaration]
253 | atexit(config_cleanup);
| ^~~~~~
com-config.c:59:1: note: ‘atexit’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’?
58 | #include "com-syslog.h"
+++ |+#include <stdlib.h>
59 |
com-config.c:259:19: error: implicit declaration of function ‘fopen’ [-Werror=implicit-function-declaration]
259 | if ((fp = fopen(file, "r")) == NULL) {
| ^~~~~
com-config.c:59:1: note: ‘fopen’ is defined in header ‘<stdio.h>’; did you forget to ‘#include <stdio.h>’?
58 | #include "com-syslog.h"
+++ |+#include <stdio.h>
59 |
com-config.c:259:17: warning: assignment to ‘FILE *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
259 | if ((fp = fopen(file, "r")) == NULL) {
| ^
com-config.c:262:17: error: implicit declaration of function ‘exit’ [-Werror=implicit-function-declaration]
262 | exit(EXIT_FAILURE);
| ^~~~
com-config.c:262:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
com-config.c:262:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
com-config.c:262:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
com-config.c:262:22: error: ‘EXIT_FAILURE’ undeclared (first use in this function)
262 | exit(EXIT_FAILURE);
| ^~~~~~~~~~~~
com-config.c:262:22: note: ‘EXIT_FAILURE’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’?
com-config.c:262:22: note: each undeclared identifier is reported only once for each function it appears in
com-config.c:282:37: warning: incompatible implicit declaration of built-in function ‘strchr’ [-Wbuiltin-declaration-mismatch]
282 | if ((data = strchr(name, ']')) != NULL)
| ^~~~~~
com-config.c:282:37: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
com-config.c:297:29: error: implicit declaration of function ‘strcasecmp’ [-Werror=implicit-function-declaration]
297 | if (strcasecmp(name, "-global-") == 0) {
| ^~~~~~~~~~
com-config.c:399:9: error: implicit declaration of function ‘fclose’; did you mean ‘close’? [-Werror=implicit-function-declaration]
399 | fclose(fp);
| ^~~~~~
| close
com-config.c:405:17: error: implicit declaration of function ‘printf’ [-Werror=implicit-function-declaration]
405 | printf("Config-File: '%.*s'\n", MAX_PATH_SIZE, file);
| ^~~~~~
com-config.c:405:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
com-config.c:405:17: warning: incompatible implicit declaration of built-in function ‘printf’ [-Wbuiltin-declaration-mismatch]
com-config.c:405:17: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
com-config.c:417:17: warning: incompatible implicit declaration of built-in function ‘exit’ [-Wbuiltin-declaration-mismatch]
417 | exit(EXIT_SUCCESS);
| ^~~~
com-config.c:417:17: note: include ‘<stdlib.h>’ or provide a declaration of ‘exit’
com-config.c:417:22: error: ‘EXIT_SUCCESS’ undeclared (first use in this function)
417 | exit(EXIT_SUCCESS);
| ^~~~~~~~~~~~
com-config.c:417:22: note: ‘EXIT_SUCCESS’ is defined in header ‘<stdlib.h>’; did you forget to ‘#include <stdlib.h>’?
com-config.c: In function ‘config_dump’:
com-config.c:447:17: error: implicit declaration of function ‘fprintf’ [-Werror=implicit-function-declaration]
447 | fprintf(fd, "[%.*s]\n", MAX_CONF_NAME,
| ^~~~~~~
com-config.c:447:17: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
com-config.c:447:17: warning: incompatible implicit declaration of built-in function ‘fprintf’ [-Wbuiltin-declaration-mismatch]
com-config.c:447:17: note: include ‘<stdio.h>’ or provide a declaration of ‘fprintf’
com-config.c: In function ‘config_sect_find’:
com-config.c:508:42: warning: incompatible implicit declaration of built-in function ‘strchr’ [-Wbuiltin-declaration-mismatch]
508 | if(sect->name && (wild = strchr(sect->name, '*'))) {
| ^~~~~~
com-config.c:508:42: note: include ‘<string.h>’ or provide a declaration of ‘strchr’
com-config.c: In function ‘config_int’:
com-config.c:577:13: error: implicit declaration of function ‘atoi’ [-Werror=implicit-function-declaration]
577 | i = atoi(p);
| ^~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:97: libcommon.a(com-config.o)] Error 1
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 297 |
Nodes: | 16 (2 / 14) |
Uptime: | 00:46:23 |
Calls: | 6,666 |
Calls today: | 4 |
Files: | 12,212 |
Messages: | 5,335,397 |