From 738162b60ca7cbaf3c85982d6deb2945d85d1c30 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 16 Jul 2017 02:06:29 +0200 Subject: [PATCH] runtests.c: Polish test_ext_entity_invalid_parse --- expat/tests/runtests.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/expat/tests/runtests.c b/expat/tests/runtests.c index 8536c263..b0a3540f 100644 --- a/expat/tests/runtests.c +++ b/expat/tests/runtests.c @@ -1310,7 +1310,7 @@ START_TEST(test_ext_entity_invalid_parse) " \n" "]>\n" "&en;"; - ExtFaults faults[] = { + const ExtFaults faults[] = { { "<", "Incomplete element declaration not faulted", @@ -1323,12 +1323,12 @@ START_TEST(test_ext_entity_invalid_parse) }, { NULL, NULL, XML_ERROR_NONE } }; - ExtFaults *fault; + const ExtFaults *fault = faults; - for (fault = &faults[0]; fault->parse_text != NULL; fault++) { + for (; fault->parse_text != NULL; fault++) { XML_SetParamEntityParsing(parser, XML_PARAM_ENTITY_PARSING_ALWAYS); XML_SetExternalEntityRefHandler(parser, external_entity_faulter); - XML_SetUserData(parser, fault); + XML_SetUserData(parser, (void *)fault); expect_failure(text, XML_ERROR_EXTERNAL_ENTITY_HANDLING, "Parser did not report external entity error");