mirror of
https://github.com/darlinghq/darling-libxml2.git
synced 2025-03-03 00:25:27 +00:00
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)
This commit is contained in:
parent
4119d1c61d
commit
9333cc2115
@ -1,3 +1,10 @@
|
||||
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) {
|
||||
|
13
valid.c
13
valid.c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user