| Index: third_party/libxslt/libxslt/preproc.c
|
| diff --git a/third_party/libxslt/libxslt/preproc.c b/third_party/libxslt/libxslt/preproc.c
|
| index 4ef3f631d98ace7eb5b3a0c864f2dbb88d9e7b4c..955b3b00e4349fd49299d6e4365bbb1c1d5f840d 100644
|
| --- a/third_party/libxslt/libxslt/preproc.c
|
| +++ b/third_party/libxslt/libxslt/preproc.c
|
| @@ -949,6 +949,8 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
| #ifdef XSLT_REFACTORED
|
| comp->nsPrefix = prefix;
|
| comp->name = name;
|
| +#else
|
| + (void)name; /* Suppress unused variable warning. */
|
| #endif
|
| } else if (prefix != NULL) {
|
| xsltTransformError(NULL, style, inst,
|
| @@ -1074,6 +1076,8 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) {
|
| #ifdef XSLT_REFACTORED
|
| comp->nsPrefix = prefix;
|
| comp->name = name;
|
| +#else
|
| + (void)name; /* Suppress unused variable warning. */
|
| #endif
|
| } else {
|
| xsltTransformError(NULL, style, inst,
|
| @@ -1301,7 +1305,8 @@ xsltGetQNameProperty(xsltStylesheetPtr style, xmlNodePtr inst,
|
| if (prop == NULL) {
|
| style->errors++;
|
| } else {
|
| - *localName = prop;
|
| + if (localName)
|
| + *localName = prop;
|
| if (hasProp)
|
| *hasProp = 1;
|
| if (URI != NULL) {
|
| @@ -2245,7 +2250,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
|
| } else if (IS_XSLT_NAME(inst, "attribute")) {
|
| xmlNodePtr parent = inst->parent;
|
|
|
| - if ((parent == NULL) || (parent->ns == NULL) ||
|
| + if ((parent == NULL) ||
|
| + (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) ||
|
| ((parent->ns != inst->ns) &&
|
| (!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
|
| (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) {
|
|
|