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)
diff --git a/ChangeLog b/ChangeLog
index a407b9a..16ae015 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/doc/examples/testWriter.c b/doc/examples/testWriter.c
index 02f9eb7..c5e9c39 100644
--- a/doc/examples/testWriter.c
+++ b/doc/examples/testWriter.c
@@ -80,7 +80,7 @@
}
/* 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 @@
}
/* 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 @@
}
/* 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 @@
}
/* 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) {
diff --git a/valid.c b/valid.c
index e78d7be..18a1fde 100644
--- a/valid.c
+++ b/valid.c
@@ -6586,6 +6586,14 @@
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 @@
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;