projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee5c368
)
spvxml-helpers: Avoid warning on recent versions of libxml2.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 6 Nov 2022 18:42:51 +0000
(10:42 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 6 Nov 2022 18:48:58 +0000
(10:48 -0800)
src/output/spv/spvxml-helpers.c
patch
|
blob
|
history
diff --git
a/src/output/spv/spvxml-helpers.c
b/src/output/spv/spvxml-helpers.c
index 825c24c89b067c46009737695469b101cd7206c9..652b60e3a6a517ca8520759cfefe077de1653c94 100644
(file)
--- 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";
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";
case XML_DOCB_DOCUMENT_NODE: return "docb document";
+#endif
default: return "<error>";
}
}
default: return "<error>";
}
}