From 8cdca5f5be97b9fb4de95e0214197f879e6fcfb7 Mon Sep 17 00:00:00 2001 From: David Hummel <6109326+hummeltech@users.noreply.github.com> Date: Mon, 20 Nov 2023 10:21:12 -0700 Subject: [PATCH] Fix broken builds with libxml2 >= v2.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **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] ``` --- src/libxml2_loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxml2_loader.cpp b/src/libxml2_loader.cpp index 223d8df44..78dc8aa97 100644 --- a/src/libxml2_loader.cpp +++ b/src/libxml2_loader.cpp @@ -88,7 +88,7 @@ class libxml2_loader : util::noncopyable if (!doc) { - xmlError* error = xmlCtxtGetLastError(ctx_); + const xmlError* error = xmlCtxtGetLastError(ctx_); if (error) { std::string msg("XML document not well formed:\n"); @@ -128,7 +128,7 @@ class libxml2_loader : util::noncopyable if (!doc) { std::string msg("XML document not well formed"); - xmlError* error = xmlCtxtGetLastError(ctx_); + const xmlError* error = xmlCtxtGetLastError(ctx_); if (error) { msg += ":\n";