]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 5328: Fix ESI build with libxml2 v2.12.0 (#1600)
authorbkuhls <bkuhls@users.noreply.github.com>
Sun, 26 Nov 2023 15:09:21 +0000 (15:09 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sun, 26 Nov 2023 19:20:21 +0000 (19:20 +0000)
    Libxml2Parser.cc:147:40: error: invalid conversion from
    'const xmlError*' to 'xmlErrorPtr' {aka 'xmlError*'} [-fpermissive]

libxml2 recently made xmlGetLastError() return a constant object.

src/esi/Libxml2Parser.cc

index f0375288511d4a7981df4b59528b3e5c1cef0386..236a37433cd66b74cc2845c10ab6b2e71dd2cbe7 100644 (file)
@@ -144,7 +144,7 @@ ESILibxml2Parser::lineNumber() const
 char const *
 ESILibxml2Parser::errorString() const
 {
-    xmlErrorPtr error = xmlGetLastError();
+    const auto error = xmlGetLastError();
 
     if (error == nullptr)
         return nullptr;