diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-08-23 14:38:32 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-08-23 16:41:11 +0200 |
commit | ee02218eb9aaa36f37619cb16bb389762e1785b2 (patch) | |
tree | b3a922af6c6521ee9d19842df466ebbc8ecd06f9 /external | |
parent | 693d9ff29e7838bafcad5faa7a4e7355807c54cb (diff) |
external/liborcus: Blind fix attempt for older macOS builds, take 2
More places that need a workaround like 5c2c08f635c30b732df48faca7ba3d411074e05a
"external/liborcus: Blind fix attempt for older macOS builds".
Change-Id: Idcdfbddabac63bcc778a43ce5dfbf6b9f70d20e1
Reviewed-on: https://gerrit.libreoffice.org/78008
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'external')
-rw-r--r-- | external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch | 71 |
1 files changed, 64 insertions, 7 deletions
diff --git a/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch b/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch index 4b77cb1be933..17bbf6393bf7 100644 --- a/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch +++ b/external/liborcus/0001-Blind-fix-attempt-for-older-macOS-builds.patch @@ -1,4 +1,4 @@ -From 46221fdfc62e317d34def4ebede814cf2bb14ebb Mon Sep 17 00:00:00 2001 +From 37e7b4629c06c241e2fbd33c1897b384875bcbd3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann <sbergman@redhat.com> Date: Fri, 23 Aug 2019 10:26:51 +0200 Subject: [PATCH] Blind fix attempt for older macOS builds @@ -30,27 +30,84 @@ MacOSX10.13.sdk, but not sure with what Clang and libc++ versions): > Makefile:1804: recipe for target 'liborcus_0.15_la-xml_map_tree.lo' failed > make[5]: *** [liborcus_0.15_la-xml_map_tree.lo] Error 1 -(while building orcus as part of LibreOffice) +(while building orcus as part of LibreOffice). + +(Using "nm" instead of a more descriptive variable name "name" to avoid +-Wshadow warnings like + +> xml_map_tree.cpp: In member function ‘orcus::xml_map_tree::element* orcus::xml_map_tree::element::get_or_create_child(orcus::xml_map_tree&, orcus::xmlns_id_t, const orcus::pstring&)’: +> xml_map_tree.cpp:214:16: warning: declaration of ‘name’ shadows a member of ‘orcus::xml_map_tree::element’ [-Wshadow] +> 214 | auto const name = sp.intern(_name.get(), _name.size()).first; +> | ^~~~ +> In file included from xml_map_tree.cpp:8: +> xml_map_tree.hpp:126:17: note: shadowed declaration is here +> 126 | pstring name; +> | ^~~~ + +) --- - src/liborcus/xml_map_tree.cpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + src/liborcus/xml_map_tree.cpp | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/liborcus/xml_map_tree.cpp b/src/liborcus/xml_map_tree.cpp -index 8338b930..8fd40534 100644 +index 8338b930..f66b1ff6 100644 --- a/src/liborcus/xml_map_tree.cpp +++ b/src/liborcus/xml_map_tree.cpp @@ -211,12 +211,13 @@ xml_map_tree::element* xml_map_tree::element::get_or_create_child( string_pool& sp = parent.m_names; // Insert a new element of this name. -+ auto const name = sp.intern(_name.get(), _name.size()).first; ++ auto const nm = sp.intern(_name.get(), _name.size()).first; child_elements->push_back( parent.m_element_pool.construct( element::args_type( parent, _ns, - sp.intern(_name.get(), _name.size()).first, -+ name, ++ nm, + element_unlinked, + reference_unknown + ) +@@ -251,12 +252,13 @@ xml_map_tree::element* xml_map_tree::element::get_or_create_linked_child( + string_pool& sp = parent.m_names; + + // Insert a new linked element of this name. ++ auto const nm = sp.intern(_name.get(), _name.size()).first; + child_elements->push_back( + parent.m_element_pool.construct( + element::args_type( + parent, + _ns, +- sp.intern(_name.get(), _name.size()).first, ++ nm, + element_linked, + _ref_type + ) +@@ -699,11 +701,12 @@ xml_map_tree::linked_node_type xml_map_tree::get_linked_node(const pstring& xpat + if (token.attribute) + throw xpath_error("root element cannot be an attribute."); + ++ auto const nm = m_names.intern(token.name).first; + mp_root = m_element_pool.construct( + element::args_type( + *this, + token.ns, +- m_names.intern(token.name).first, ++ nm, + element_unlinked, + reference_unknown + ) +@@ -789,11 +792,12 @@ xml_map_tree::element* xml_map_tree::get_element(const pstring& xpath) + if (token.attribute) + throw xpath_error("root element cannot be an attribute."); + ++ auto const nm = m_names.intern(token.name).first; + mp_root = m_element_pool.construct( + element::args_type( + *this, + token.ns, +- m_names.intern(token.name).first, ++ nm, element_unlinked, reference_unknown ) |