Fix broken builds with libxml2 >= v2.12.0

**I.E.**
```
src/libxml2_loader.cpp:91:50: error: invalid conversion from ‘const xmlError*’ {aka ‘const _xmlError*’} to ‘xmlError*’ {aka ‘_xmlError*’} [-fpermissive]
src/libxml2_loader.cpp:131:50: error: invalid conversion from ‘const xmlError*’ {aka ‘const _xmlError*’} to ‘xmlError*’ {aka ‘_xmlError*’} [-fpermissive]
```
This commit is contained in:
David Hummel 2023-11-20 10:21:12 -07:00
parent d745e43eb1
commit 8cdca5f5be

View file

@ -88,7 +88,7 @@ class libxml2_loader : util::noncopyable
if (!doc) if (!doc)
{ {
xmlError* error = xmlCtxtGetLastError(ctx_); const xmlError* error = xmlCtxtGetLastError(ctx_);
if (error) if (error)
{ {
std::string msg("XML document not well formed:\n"); std::string msg("XML document not well formed:\n");
@ -128,7 +128,7 @@ class libxml2_loader : util::noncopyable
if (!doc) if (!doc)
{ {
std::string msg("XML document not well formed"); std::string msg("XML document not well formed");
xmlError* error = xmlCtxtGetLastError(ctx_); const xmlError* error = xmlCtxtGetLastError(ctx_);
if (error) if (error)
{ {
msg += ":\n"; msg += ":\n";