>From d176b6afddb6b8efd42a83ac77537a2a119db713 Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Mon, 2 May 2016 17:30:21 +0200 Subject: [PATCH] xmlschemastypes.c: OS400 C compiler is not C99 compliant. It only supports local variable declarations at the beginning of a block. --- xmlschemastypes.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 60f5414..093051d 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -5307,6 +5307,7 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet, xmlSchemaWhitespaceValueType ws) { int ret; + int stringType; if (facet == NULL) return(-1); @@ -5324,8 +5325,8 @@ xmlSchemaValidateFacetInternal(xmlSchemaFacetPtr facet, * the datatype. * See https://www.w3.org/TR/xmlschema-2/#rf-pattern */ - const int stringType = val && ((val->type >= XML_SCHEMAS_STRING && val->type <= XML_SCHEMAS_NORMSTRING) - || (val->type >= XML_SCHEMAS_TOKEN && val->type <= XML_SCHEMAS_NCNAME)); + stringType = val && ((val->type >= XML_SCHEMAS_STRING && val->type <= XML_SCHEMAS_NORMSTRING) + || (val->type >= XML_SCHEMAS_TOKEN && val->type <= XML_SCHEMAS_NCNAME)); ret = xmlRegexpExec(facet->regexp, (stringType && val->value.str) ? val->value.str : value); if (ret == 1) -- 1.9.3