[totem-pl-parser] plparser: Disable XML parser error output
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] plparser: Disable XML parser error output
- Date: Thu, 5 Jan 2017 16:46:58 +0000 (UTC)
commit 6dbb837c0d38552b7730e4137c4d8febec2220c2
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jan 5 17:46:10 2017 +0100
plparser: Disable XML parser error output
We don't need it, we already catch errors in other ways.
plparse/totem-pl-parser-xspf.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser-xspf.c b/plparse/totem-pl-parser-xspf.c
index 7acf13a..c0d818b 100644
--- a/plparse/totem-pl-parser-xspf.c
+++ b/plparse/totem-pl-parser-xspf.c
@@ -40,6 +40,12 @@
#define SAFE_FREE(x) { if (x != NULL) xmlFree (x); }
+static void
+debug_noop (void *ctx, const char *msg, ...)
+{
+ return;
+}
+
static xmlDocPtr
totem_pl_parser_parse_xml_file (GFile *file)
{
@@ -64,6 +70,7 @@ totem_pl_parser_parse_xml_file (GFile *file)
}
}
+ xmlSetGenericErrorFunc (NULL, (xmlGenericErrorFunc) debug_noop);
doc = xmlParseMemory (contents, size);
if (doc == NULL)
doc = xmlRecoverMemory (contents, size);
@@ -519,6 +526,7 @@ totem_pl_parser_add_xspf_with_contents (TotemPlParser *parser,
xmlNodePtr node;
TotemPlParserResult retval = TOTEM_PL_PARSER_RESULT_UNHANDLED;
+ xmlSetGenericErrorFunc (NULL, (xmlGenericErrorFunc) debug_noop);
doc = xmlParseMemory (contents, strlen (contents));
if (doc == NULL)
doc = xmlRecoverMemory (contents, strlen (contents));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]