From 911c83be2e2074a787f37a8da948d6a5e3838f83 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 6 Nov 2022 10:42:51 -0800 Subject: [PATCH] spvxml-helpers: Avoid warning on recent versions of libxml2. --- src/output/spv/spvxml-helpers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/output/spv/spvxml-helpers.c b/src/output/spv/spvxml-helpers.c index 825c24c89b..652b60e3a6 100644 --- a/src/output/spv/spvxml-helpers.c +++ b/src/output/spv/spvxml-helpers.c @@ -77,7 +77,13 @@ xml_element_type_to_string (xmlElementType type) case XML_NAMESPACE_DECL: return "namespace declaration"; case XML_XINCLUDE_START: return "XInclude start"; case XML_XINCLUDE_END: return "XInclude end"; + +#ifndef XML_DOCB_DOCUMENT_NODE + /* libxml2 removed this value from the enum and redefined it as a macro + for backward compatibility. When it's not in the enum, it's best not + to have a 'case' for it because that provokes a compiler warning. */ case XML_DOCB_DOCUMENT_NODE: return "docb document"; +#endif default: return ""; } } -- 2.30.2