diff options
Diffstat (limited to 'chromium/third_party/libxslt/libxslt/preproc.c')
-rw-r--r-- | chromium/third_party/libxslt/libxslt/preproc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/chromium/third_party/libxslt/libxslt/preproc.c b/chromium/third_party/libxslt/libxslt/preproc.c index 4ef3f631d98..955b3b00e43 100644 --- a/chromium/third_party/libxslt/libxslt/preproc.c +++ b/chromium/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"))) { |