diff --git a/runsuite.c b/runsuite.c index aaab13e1ee693ffedfc3606bdc25543c05fa9541..767455bd0a4aeb2c5a173db22dd36d79ba6111b4 100644 --- a/runsuite.c +++ b/runsuite.c @@ -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) { diff --git a/runtest.c b/runtest.c index 80e498c799c3d030f6a28bb38cd9adf6678ac13c..b1c30d8525d056251bde37a46ed2aafc024dd456 100644 --- a/runtest.c +++ b/runtest.c @@ -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);