greenlight/xml fails to compile
Opened this issue · 0 comments
skinkie commented
go run cmd/*go
# github.com/concreteit/greenlight/xml
lxml.c: In function ‘validationErrorFunc’:
lxml.c:16:14: warning: implicit declaration of function ‘malloc’ [-Wimplicit-function-declaration]
16 | msgStr = malloc(strlen(error->message));
| ^~~~~~
lxml.c:7:1: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
6 | #include "lxml.h"
+++ |+#include <stdlib.h>
7 |
lxml.c:16:14: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
16 | msgStr = malloc(strlen(error->message));
| ^~~~~~
lxml.c:16:14: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
lxml.c:21:21: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
21 | errMessage *msg = malloc(sizeof(errMessage));
| ^~~~~~
lxml.c:21:21: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
lxml.c: In function ‘newValidationResult’:
lxml.c:48:35: warning: incompatible implicit declaration of built-in function ‘malloc’ [-Wbuiltin-declaration-mismatch]
48 | res = (validationResult*) malloc(sizeof(validationResult));
| ^~~~~~
lxml.c:48:35: note: include ‘<stdlib.h>’ or provide a declaration of ‘malloc’
lxml.c: In function ‘freeValidationResult’:
lxml.c:60:7: warning: implicit declaration of function ‘free’ [-Wimplicit-function-declaration]
60 | free(res->errors[i]);
| ^~~~
lxml.c:60:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
lxml.c:60:7: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
lxml.c:60:7: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
lxml.c:63:3: warning: incompatible implicit declaration of built-in function ‘free’ [-Wbuiltin-declaration-mismatch]
63 | free(res);
| ^~~~
lxml.c:63:3: note: include ‘<stdlib.h>’ or provide a declaration of ‘free’
lxml.c: In function ‘validateStream’:
lxml.c:82:42: warning: passing argument 2 of ‘xmlSchemaSetValidStructuredErrors’ from incompatible pointer type [-Wincompatible-pointer-types]
82 | xmlSchemaSetValidStructuredErrors(ctx, validationErrorFunc, res);
| ^~~~~~~~~~~~~~~~~~~
| |
| void (*)(void *, xmlError *) {aka void (*)(void *, struct _xmlError *)}
In file included from lxml.c:5:
/usr/include/libxml2/libxml/xmlschemas.h:185:65: note: expected ‘xmlStructuredErrorFunc’ {aka ‘void (*)(void *, const struct _xmlError *)’} but argument is of type ‘void (*)(void *, xmlError *)’ {aka ‘void (*)(void *, struct _xmlError *)’}
185 | xmlStructuredErrorFunc serror,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
NeTEx/Siri validation tool