Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(325)

Unified Diff: third_party/libxslt/libxslt/preproc.c

Issue 1848793005: Roll libxslt to 891681e3e948f31732229f53cb6db7215f740fc7 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libxslt/libxslt/pattern.c ('k') | third_party/libxslt/libxslt/transform.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"))) {
« no previous file with comments | « third_party/libxslt/libxslt/pattern.c ('k') | third_party/libxslt/libxslt/transform.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698