1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-24 13:33:01 +03:00

Ignore function pointer cast warnings

Use GCC pragmas as these warnings are enabled by -Wpedantic and there's
no way to disable them selectively.
This commit is contained in:
Nick Wellnhofer
2017-11-12 17:28:12 +01:00
parent 8813f397f8
commit 13acadbb1c
3 changed files with 20 additions and 2 deletions

View File

@@ -4880,7 +4880,9 @@ xmlXPathRegisterFuncNS(xmlXPathContextPtr ctxt, const xmlChar *name,
return(-1);
if (f == NULL)
return(xmlHashRemoveEntry2(ctxt->funcHash, name, ns_uri, NULL));
return(xmlHashAddEntry2(ctxt->funcHash, name, ns_uri, XML_CAST_FPTR(f)));
XML_IGNORE_PEDANTIC_WARNINGS
return(xmlHashAddEntry2(ctxt->funcHash, name, ns_uri, (void *) f));
XML_POP_WARNINGS
}
/**
@@ -4961,7 +4963,9 @@ xmlXPathFunctionLookupNS(xmlXPathContextPtr ctxt, const xmlChar *name,
if (ctxt->funcHash == NULL)
return(NULL);
XML_CAST_FPTR(ret) = xmlHashLookup2(ctxt->funcHash, name, ns_uri);
XML_IGNORE_PEDANTIC_WARNINGS
ret = (xmlXPathFunction) xmlHashLookup2(ctxt->funcHash, name, ns_uri);
XML_POP_WARNINGS
return(ret);
}