]>
git.lttng.org Git - lttng-tools.git/commit
tests: remove uses of `xmlKeepBlanksDefault()`
When compiling against libxml 2.12.6, I get:
CXX extract_xml-extract_xml.o
/home/simark/src/lttng-tools/tests/utils/xml-utils/extract_xml.cpp: In function ‘int main(int, char**)’:
/home/simark/src/lttng-tools/tests/utils/xml-utils/extract_xml.cpp:256:29: error: ‘int xmlKeepBlanksDefault(int)’ is deprecated [-Werror=deprecated-declarations]
256 | xmlKeepBlanksDefault(0);
| ~~~~~~~~~~~~~~~~~~~~^~~
In file included from /home/simark/src/lttng-tools/tests/utils/xml-utils/extract_xml.cpp:29:
/usr/include/libxml2/libxml/parser.h:957:17: note: declared here
957 | xmlKeepBlanksDefault (int val);
| ^~~~~~~~~~~~~~~~~~~~
The documentation[1] suggests moving to "the modern options API with
XML_PARSE_NOBLANKS", do that.
Add a new `xml_parser_ctx_uptr` RAII object to manage the lifetime of
the `xmlParserCtxt` object.
[1] https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/libxml2-parser.html#xmlKeepBlanksDefault
Change-Id: I7f9e70d2245fa333e01296aa2b4e3efa4e7fbefa
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
This page took 0.029659 seconds and 4 git commands to generate.