[libxslt] Fix some warnings in the refactored code



commit 1a40591d824391efd377a0859a9fab928a36f498
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Mon Nov 8 11:14:26 2010 +0100

    Fix some warnings in the refactored code

 libxslt/namespaces.c |    2 +-
 libxslt/variables.c  |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/libxslt/namespaces.c b/libxslt/namespaces.c
index 3e3891f..48cf039 100644
--- a/libxslt/namespaces.c
+++ b/libxslt/namespaces.c
@@ -585,7 +585,7 @@ declare_new_prefix:
 	int counter = 1;
 
 	if (nsPrefix == NULL) {
-	    nsPrefix = "ns";
+	    nsPrefix = BAD_CAST "ns";
 	}
 
 	do {
diff --git a/libxslt/variables.c b/libxslt/variables.c
index 43a6156..cb0d4b0 100644
--- a/libxslt/variables.c
+++ b/libxslt/variables.c
@@ -675,6 +675,9 @@ xsltStackLookup(xsltTransformContextPtr ctxt, const xmlChar *name,
     return(NULL);
 }
 
+#ifdef XSLT_REFACTORED
+#else
+
 /**
  * xsltCheckStackElem:
  * @ctxt:  xn XSLT transformation context
@@ -710,6 +713,8 @@ xsltCheckStackElem(xsltTransformContextPtr ctxt, const xmlChar *name,
     return(1);
 }
 
+#endif /* XSLT_REFACTORED */
+
 /**
  * xsltAddStackElem:
  * @ctxt:  xn XSLT transformation context
@@ -1045,7 +1050,11 @@ xsltEvalGlobalVariable(xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
 #endif
 
     oldInst = ctxt->inst;
+#ifdef XSLT_REFACTORED
+    comp = (xsltStyleBasicItemVariablePtr) elem->comp;
+#else
     comp = elem->comp;
+#endif
     oldVarName = elem->name;
     elem->name = xsltComputingGlobalVarMarker;
     /*



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]