Commit 9333cc21 authored by William M. Brack's avatar William M. Brack
Browse files

suppressed warnings from within xmlValidGetValidElements (bug 144644)

* valid.c: suppressed warnings from within xmlValidGetValidElements
  (bug 144644)
* doc/examples/testWriter.c: corrected typo in comment for ISO-8859-1
  (bug 144245)
parent 4119d1c6
Thu Jun 24 16:27:44 HKT 2004 William Brack <wbrack@mmm.com.hk>
* valid.c: suppressed warnings from within xmlValidGetValidElements
(bug 144644)
* doc/examples/testWriter.c: corrected typo in comment for ISO-8859-1
(bug 144245)
Thu Jun 24 10:17:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
 
* valid.c: implemented bugfix from Massimo Morara for DTD
......
......@@ -80,7 +80,7 @@ testXmlwriterFilename(const char *uri)
}
/* Start the document with the xml default for the version,
* encoding ISO 8858-1 and the default for the standalone
* encoding ISO 8859-1 and the default for the standalone
* declaration. */
rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
if (rc < 0) {
......@@ -359,7 +359,7 @@ testXmlwriterMemory(const char *file)
}
/* Start the document with the xml default for the version,
* encoding ISO 8858-1 and the default for the standalone
* encoding ISO 8859-1 and the default for the standalone
* declaration. */
rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
if (rc < 0) {
......@@ -636,7 +636,7 @@ testXmlwriterDoc(const char *file)
}
/* Start the document with the xml default for the version,
* encoding ISO 8858-1 and the default for the standalone
* encoding ISO 8859-1 and the default for the standalone
* declaration. */
rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
if (rc < 0) {
......@@ -908,7 +908,7 @@ testXmlwriterTree(const char *file)
}
/* Start the document with the xml default for the version,
* encoding ISO 8858-1 and the default for the standalone
* encoding ISO 8859-1 and the default for the standalone
* declaration. */
rc = xmlTextWriterStartDocument(writer, NULL, MY_ENCODING, NULL);
if (rc < 0) {
......
......@@ -6586,6 +6586,14 @@ xmlValidGetPotentialChildren(xmlElementContent *ctree, const xmlChar **list,
return(*len);
}
/*
* Dummy function to suppress messages while we try out valid elements
*/
static void xmlNoValidityErr(void *ctx ATTRIBUTE_UNUSED,
const char *msg ATTRIBUTE_UNUSED, ...) {
return;
}
/**
* xmlValidGetValidElements:
* @prev: an element to insert after
......@@ -6631,14 +6639,15 @@ xmlValidGetValidElements(xmlNode *prev, xmlNode *next, const xmlChar **names,
xmlElement *element_desc;
memset(&vctxt, 0, sizeof (xmlValidCtxt));
if (prev == NULL && next == NULL)
return(-1);
if (names == NULL) return(-1);
if (max <= 0) return(-1);
memset(&vctxt, 0, sizeof (xmlValidCtxt));
vctxt.error = xmlNoValidityErr; /* this suppresses err/warn output */
nb_valid_elements = 0;
ref_node = prev ? prev : next;
parent = ref_node->parent;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment