Fix: error: incompatible function pointer types passing 'void (void *, xmlErrorPtr)' (aka 'void (void *, struct _xmlError *)') to parameter of type 'xmlStructuredErrorFunc' (aka 'void (*)(void *, const struct _xmlError *)') [-Wincompatible-function-pointer-types] error: incompatible function pointer types passing 'void (void *, void *, xmlChar *)' (aka 'void (void *, void *, unsigned char *)') to parameter of type 'xmlHashScanner' (aka 'void (*)(void *, void *, const unsigned char *)') [-Wincompatible-function-pointer-types] https://sourceforge.net/p/xmlstar/patches/22/ --- src/xml.c +++ src/xml.c @@ -104,7 +104,7 @@ void reportGenericError(void* ctx, const char * msg, ...) { /* by default all errors are reported */ static ErrorInfo errorInfo = { NULL, NULL, VERBOSE, CONTINUE }; -void reportError(void *ptr, xmlErrorPtr error) +void reportError(void *ptr, const xmlError *error) { ErrorInfo *errorInfo = (ErrorInfo*) ptr; assert(errorInfo); --- src/xml_elem.c +++ src/xml_elem.c @@ -186,7 +186,7 @@ typedef struct { * put @name into @data->array[@data->offset] */ static void -hash_key_put(void *payload, void *data, xmlChar *name) +hash_key_put(void *payload, void *data, const xmlChar *name) { ArrayDest *dest = data; dest->array[dest->offset++] = name; --- src/xmlstar.h +++ src/xmlstar.h @@ -32,7 +32,7 @@ typedef struct _errorInfo { ErrorStop stop; } ErrorInfo; -void reportError(void *ptr, xmlErrorPtr error); +void reportError(void *ptr, const xmlError *error); void suppressErrors(void); typedef struct _gOptions {