Commit dcae579e authored by Nick Wellnhofer's avatar Nick Wellnhofer

Remove unneeded function pointer casts

parent 19f0950d
......@@ -327,10 +327,8 @@ xsdIncorectTestCase(xmlNodePtr cur) {
}
xmlNodeDump(buf, test->doc, test, 0, 0);
pctxt = xmlRelaxNGNewMemParserCtxt((const char *)buf->content, buf->use);
xmlRelaxNGSetParserErrors(pctxt,
(xmlRelaxNGValidityErrorFunc) testErrorHandler,
(xmlRelaxNGValidityWarningFunc) testErrorHandler,
pctxt);
xmlRelaxNGSetParserErrors(pctxt, testErrorHandler, testErrorHandler,
pctxt);
rng = xmlRelaxNGParse(pctxt);
xmlRelaxNGFreeParserCtxt(pctxt);
if (rng != NULL) {
......@@ -462,10 +460,8 @@ xsdTestCase(xmlNodePtr tst) {
}
xmlNodeDump(buf, test->doc, test, 0, 0);
pctxt = xmlRelaxNGNewMemParserCtxt((const char *)buf->content, buf->use);
xmlRelaxNGSetParserErrors(pctxt,
(xmlRelaxNGValidityErrorFunc) testErrorHandler,
(xmlRelaxNGValidityWarningFunc) testErrorHandler,
pctxt);
xmlRelaxNGSetParserErrors(pctxt, testErrorHandler, testErrorHandler,
pctxt);
rng = xmlRelaxNGParse(pctxt);
xmlRelaxNGFreeParserCtxt(pctxt);
if (extraMemoryFromResolver)
......@@ -510,9 +506,7 @@ xsdTestCase(xmlNodePtr tst) {
nb_tests++;
ctxt = xmlRelaxNGNewValidCtxt(rng);
xmlRelaxNGSetValidErrors(ctxt,
(xmlRelaxNGValidityErrorFunc) testErrorHandler,
(xmlRelaxNGValidityWarningFunc) testErrorHandler,
ctxt);
testErrorHandler, testErrorHandler, ctxt);
ret = xmlRelaxNGValidateDoc(ctxt, doc);
xmlRelaxNGFreeValidCtxt(ctxt);
if (ret > 0) {
......@@ -567,9 +561,7 @@ xsdTestCase(xmlNodePtr tst) {
nb_tests++;
ctxt = xmlRelaxNGNewValidCtxt(rng);
xmlRelaxNGSetValidErrors(ctxt,
(xmlRelaxNGValidityErrorFunc) testErrorHandler,
(xmlRelaxNGValidityWarningFunc) testErrorHandler,
ctxt);
testErrorHandler, testErrorHandler, ctxt);
ret = xmlRelaxNGValidateDoc(ctxt, doc);
xmlRelaxNGFreeValidCtxt(ctxt);
if (ret == 0) {
......@@ -825,10 +817,7 @@ xstcTestInstance(xmlNodePtr cur, xmlSchemaPtr schemas,
}
ctxt = xmlSchemaNewValidCtxt(schemas);
xmlSchemaSetValidErrors(ctxt,
(xmlSchemaValidityErrorFunc) testErrorHandler,
(xmlSchemaValidityWarningFunc) testErrorHandler,
ctxt);
xmlSchemaSetValidErrors(ctxt, testErrorHandler, testErrorHandler, ctxt);
ret = xmlSchemaValidateDoc(ctxt, doc);
if (xmlStrEqual(validity, BAD_CAST "valid")) {
......@@ -916,10 +905,8 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
if (xmlStrEqual(validity, BAD_CAST "valid")) {
nb_schematas++;
ctxt = xmlSchemaNewParserCtxt((const char *) path);
xmlSchemaSetParserErrors(ctxt,
(xmlSchemaValidityErrorFunc) testErrorHandler,
(xmlSchemaValidityWarningFunc) testErrorHandler,
ctxt);
xmlSchemaSetParserErrors(ctxt, testErrorHandler, testErrorHandler,
ctxt);
schemas = xmlSchemaParse(ctxt);
xmlSchemaFreeParserCtxt(ctxt);
if (schemas == NULL) {
......@@ -952,10 +939,8 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
} else if (xmlStrEqual(validity, BAD_CAST "invalid")) {
nb_schematas++;
ctxt = xmlSchemaNewParserCtxt((const char *) path);
xmlSchemaSetParserErrors(ctxt,
(xmlSchemaValidityErrorFunc) testErrorHandler,
(xmlSchemaValidityWarningFunc) testErrorHandler,
ctxt);
xmlSchemaSetParserErrors(ctxt, testErrorHandler, testErrorHandler,
ctxt);
schemas = xmlSchemaParse(ctxt);
xmlSchemaFreeParserCtxt(ctxt);
if (schemas != NULL) {
......
......@@ -3019,10 +3019,7 @@ schemasOneTest(const char *sch,
}
ctxt = xmlSchemaNewValidCtxt(schemas);
xmlSchemaSetValidErrors(ctxt,
(xmlSchemaValidityErrorFunc) testErrorHandler,
(xmlSchemaValidityWarningFunc) testErrorHandler,
ctxt);
xmlSchemaSetValidErrors(ctxt, testErrorHandler, testErrorHandler, ctxt);
validResult = xmlSchemaValidateDoc(ctxt, doc);
if (validResult == 0) {
fprintf(schemasOutput, "%s validates\n", filename);
......@@ -3087,10 +3084,7 @@ schemasTest(const char *filename,
/* first compile the schemas if possible */
ctxt = xmlSchemaNewParserCtxt(filename);
xmlSchemaSetParserErrors(ctxt,
(xmlSchemaValidityErrorFunc) testErrorHandler,
(xmlSchemaValidityWarningFunc) testErrorHandler,
ctxt);
xmlSchemaSetParserErrors(ctxt, testErrorHandler, testErrorHandler, ctxt);
schemas = xmlSchemaParse(ctxt);
xmlSchemaFreeParserCtxt(ctxt);
......@@ -3196,10 +3190,7 @@ rngOneTest(const char *sch,
}
ctxt = xmlRelaxNGNewValidCtxt(schemas);
xmlRelaxNGSetValidErrors(ctxt,
(xmlRelaxNGValidityErrorFunc) testErrorHandler,
(xmlRelaxNGValidityWarningFunc) testErrorHandler,
ctxt);
xmlRelaxNGSetValidErrors(ctxt, testErrorHandler, testErrorHandler, ctxt);
ret = xmlRelaxNGValidateDoc(ctxt, doc);
if (ret == 0) {
testErrorHandler(NULL, "%s validates\n", filename);
......@@ -3266,10 +3257,7 @@ rngTest(const char *filename,
/* first compile the schemas if possible */
ctxt = xmlRelaxNGNewParserCtxt(filename);
xmlRelaxNGSetParserErrors(ctxt,
(xmlRelaxNGValidityErrorFunc) testErrorHandler,
(xmlRelaxNGValidityWarningFunc) testErrorHandler,
ctxt);
xmlRelaxNGSetParserErrors(ctxt, testErrorHandler, testErrorHandler, ctxt);
schemas = xmlRelaxNGParse(ctxt);
xmlRelaxNGFreeParserCtxt(ctxt);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment