Patched warning issued on SGI by Stephane.Conversy@lri.fr, Daniel.
diff --git a/ChangeLog b/ChangeLog
index 791bba7..621a0ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Aug 30 13:22:26 CEST 1999
+
+	* parser.c valid.[ch] xpath.c: patched compilation warnings reported
+	  on SGI by Stephane.Conversy@lri.fr
+
 Sun Aug 29 22:27:29 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org>
 
 	* all .h : changed the prototype declaration indent as in gtk
diff --git a/include/libxml/valid.h b/include/libxml/valid.h
index aaef25d..37b4f99 100644
--- a/include/libxml/valid.h
+++ b/include/libxml/valid.h
@@ -9,6 +9,11 @@
 
 #ifndef __XML_VALID_H__
 #define __XML_VALID_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "tree.h"
 
 /**
@@ -95,7 +100,8 @@
 					 xmlNotationTablePtr table);
 
 /* Element Content */
-xmlElementContentPtr xmlNewElementContent (CHAR *name, int type);
+xmlElementContentPtr xmlNewElementContent (CHAR *name,
+					   xmlElementContentType type);
 xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
 void		     xmlFreeElementContent(xmlElementContentPtr cur);
 
@@ -103,7 +109,7 @@
 xmlElementPtr	   xmlAddElementDecl	(xmlValidCtxtPtr ctxt,
 					 xmlDtdPtr dtd,
 					 const CHAR *name,
-					 int type,
+					 xmlElementContentType type,
 					 xmlElementContentPtr content);
 xmlElementTablePtr xmlCopyElementTable	(xmlElementTablePtr table);
 void		   xmlFreeElementTable	(xmlElementTablePtr table);
@@ -120,8 +126,8 @@
 					     xmlDtdPtr dtd,
 					     const CHAR *elem,
 					     const CHAR *name,
-					     int type,
-					     int def,
+					     xmlAttributeType type,
+					     xmlAttributeDefault def,
 					     const CHAR *defaultValue,
 					     xmlEnumerationPtr tree);
 xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);
@@ -187,4 +193,8 @@
 					 const CHAR *name);
 xmlElementPtr	xmlGetDtdElementDesc	(xmlDtdPtr dtd,
 					 const CHAR *name);
+
+#ifdef __cplusplus
+}
+#endif
 #endif /* __XML_VALID_H__ */
diff --git a/parser.c b/parser.c
index 3ca8053..0a0b396 100644
--- a/parser.c
+++ b/parser.c
@@ -4658,7 +4658,7 @@
 	    while ((CUR == 0) && (ctxt->inputNr > 1))
 		xmlPopInput(ctxt);
 
-	    if ((CUR_PTR == check) && (cons = ctxt->input->consumed)) {
+	    if ((CUR_PTR == check) && (cons == ctxt->input->consumed)) {
 		if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
 		    ctxt->sax->error(ctxt->userData, 
 		 "xmlParseDocTypeDecl: error detected in Markup declaration\n");
@@ -5146,15 +5146,20 @@
     const CHAR *openTag = CUR_PTR;
     CHAR *name;
     xmlParserNodeInfo node_info;
+    xmlNodePtr ret;
 
     /* Capture start position */
-    node_info.begin_pos = CUR_PTR - ctxt->input->base;
-    node_info.begin_line = ctxt->input->line;
+    if (ctxt->record_info) {
+        node_info.begin_pos = ctxt->input->consumed +
+                          (CUR_PTR - ctxt->input->base);
+	node_info.begin_line = ctxt->input->line;
+    }
 
     name = xmlParseStartTag(ctxt);
     if (name == NULL) {
         return;
     }
+    ret = ctxt->node;
 
     /*
      * [ VC: Root Element Type ]
@@ -5188,6 +5193,17 @@
 	 */
 	nodePop(ctxt);
 	free(name);
+
+	/*
+	 * Capture end position and add node
+	 */
+	if ( ret != NULL && ctxt->record_info ) {
+	   node_info.end_pos = ctxt->input->consumed +
+			      (CUR_PTR - ctxt->input->base);
+	   node_info.end_line = ctxt->input->line;
+	   node_info.node = ret;
+	   xmlParserAddNodeInfo(ctxt, &node_info);
+	}
 	return;
     }
 
@@ -5214,6 +5230,17 @@
      */
     xmlParseEndTag(ctxt, name);
     free(name);
+
+    /*
+     * Capture end position and add node
+     */
+    if ( ret != NULL && ctxt->record_info ) {
+       node_info.end_pos = ctxt->input->consumed +
+                          (CUR_PTR - ctxt->input->base);
+       node_info.end_line = ctxt->input->line;
+       node_info.node = ret;
+       xmlParserAddNodeInfo(ctxt, &node_info);
+    }
 }
 
 /**
diff --git a/valid.c b/valid.c
index a7ea860..bb7a747 100644
--- a/valid.c
+++ b/valid.c
@@ -43,7 +43,7 @@
  * Returns NULL if not, othervise the new element content structure
  */
 xmlElementContentPtr
-xmlNewElementContent(CHAR *name, int type) {
+xmlNewElementContent(CHAR *name, xmlElementContentType type) {
     xmlElementContentPtr ret;
 
     switch(type) {
@@ -296,7 +296,7 @@
  */
 xmlElementPtr
 xmlAddElementDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *name,
-                  int type, xmlElementContentPtr content) {
+                  xmlElementContentType type, xmlElementContentPtr content) {
     xmlElementPtr ret, cur;
     xmlElementTablePtr table;
     int i;
@@ -741,8 +741,9 @@
  */
 xmlAttributePtr
 xmlAddAttributeDecl(xmlValidCtxtPtr ctxt, xmlDtdPtr dtd, const CHAR *elem,
-                    const CHAR *name, int type, int def,
-		    const CHAR *defaultValue, xmlEnumerationPtr tree) {
+                    const CHAR *name, xmlAttributeType type, 
+                    xmlAttributeDefault def, const CHAR *defaultValue,
+                    xmlEnumerationPtr tree) {
     xmlAttributePtr ret, cur;
     xmlAttributeTablePtr table;
     xmlElementPtr elemDef;
diff --git a/valid.h b/valid.h
index aaef25d..37b4f99 100644
--- a/valid.h
+++ b/valid.h
@@ -9,6 +9,11 @@
 
 #ifndef __XML_VALID_H__
 #define __XML_VALID_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include "tree.h"
 
 /**
@@ -95,7 +100,8 @@
 					 xmlNotationTablePtr table);
 
 /* Element Content */
-xmlElementContentPtr xmlNewElementContent (CHAR *name, int type);
+xmlElementContentPtr xmlNewElementContent (CHAR *name,
+					   xmlElementContentType type);
 xmlElementContentPtr xmlCopyElementContent(xmlElementContentPtr content);
 void		     xmlFreeElementContent(xmlElementContentPtr cur);
 
@@ -103,7 +109,7 @@
 xmlElementPtr	   xmlAddElementDecl	(xmlValidCtxtPtr ctxt,
 					 xmlDtdPtr dtd,
 					 const CHAR *name,
-					 int type,
+					 xmlElementContentType type,
 					 xmlElementContentPtr content);
 xmlElementTablePtr xmlCopyElementTable	(xmlElementTablePtr table);
 void		   xmlFreeElementTable	(xmlElementTablePtr table);
@@ -120,8 +126,8 @@
 					     xmlDtdPtr dtd,
 					     const CHAR *elem,
 					     const CHAR *name,
-					     int type,
-					     int def,
+					     xmlAttributeType type,
+					     xmlAttributeDefault def,
 					     const CHAR *defaultValue,
 					     xmlEnumerationPtr tree);
 xmlAttributeTablePtr xmlCopyAttributeTable  (xmlAttributeTablePtr table);
@@ -187,4 +193,8 @@
 					 const CHAR *name);
 xmlElementPtr	xmlGetDtdElementDesc	(xmlDtdPtr dtd,
 					 const CHAR *name);
+
+#ifdef __cplusplus
+}
+#endif
 #endif /* __XML_VALID_H__ */
diff --git a/xpath.c b/xpath.c
index 9fc3b16..694d4ef 100644
--- a/xpath.c
+++ b/xpath.c
@@ -3930,11 +3930,9 @@
     int nodetest = NODE_TEST_NONE;
     int nodetype = 0;
     xmlNodeSetPtr newset = NULL;
-    int attribute = 0;
 
     if (CUR == '@') {
         NEXT;
-	attribute = 1;
 	axis = AXIS_ATTRIBUTE;
 	goto parse_NodeTest;
     } else if (CUR == '*') {