Fix failure to build with libxml2 version 2.12
This declared some xmlError pointers const, which probably was always assumed, but not made explicit. Signed-off-by: Nils Philippsen <nils@tiptoe.de>
This commit is contained in:
parent
253dcb312b
commit
e995daa375
@ -255,7 +255,7 @@ libxml_generic_error_func (void* /* parsing_context*/,
|
||||
|
||||
static void
|
||||
libxml_structured_error_func (void* /* parsing_context*/,
|
||||
xmlErrorPtr err)
|
||||
const xmlError *err)
|
||||
{
|
||||
string msg;
|
||||
|
||||
@ -403,7 +403,11 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
/* stop libxml from spewing to stdout/stderr */
|
||||
|
||||
xmlSetGenericErrorFunc (this, libxml_generic_error_func);
|
||||
xmlSetStructuredErrorFunc (this, libxml_structured_error_func);
|
||||
|
||||
/* Cast to xmlStructuredErrorFunc to cope with different constness in different
|
||||
* versions of libxml2. */
|
||||
|
||||
xmlSetStructuredErrorFunc (this, (xmlStructuredErrorFunc)libxml_structured_error_func);
|
||||
|
||||
/* Set this up early */
|
||||
|
||||
|
@ -170,7 +170,7 @@ XMLTree::write() const
|
||||
result = xmlSaveFormatFileEnc(_filename.c_str(), doc, "UTF-8", 1);
|
||||
#ifndef NDEBUG
|
||||
if (result == -1) {
|
||||
xmlErrorPtr xerr = xmlGetLastError ();
|
||||
const xmlError *xerr = xmlGetLastError ();
|
||||
if (!xerr) {
|
||||
std::cerr << "unknown XML error during xmlSaveFormatFileEnc()." << std::endl;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user