[Libreoffice-commits] core.git: include/comphelper

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 29 10:23:43 UTC 2019


 include/comphelper/scopeguard.hxx |   28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

New commits:
commit f24e50c90fb802cba0a9d77ecb0f105ea4516ebb
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Apr 29 11:36:51 2019 +0300
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Apr 29 12:22:51 2019 +0200

    Fix Android build after commit ac419786b3244d909901db053841862abf5e7a2f
    
    ... giving this error:
    
       In file included from
       /home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:50:
       /home/android/lo/master-android-arm/include/comphelper/scopeguard.hxx:36:14:
       error: function 'comphelper::<deduction guide for ScopeGuard><(lambda at
       /home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:146:34)>'
       has internal linkage but is not defined [-Werror,-Wundefined-internal]
           explicit ScopeGuard( Func && func ) : m_func( std::move(func) ) {}
                    ^
       /home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:146:28:
       note: used here
           comphelper::ScopeGuard guard([&]() {
                                  ^
    
    See https://lists.freedesktop.org/archives/libreoffice/2019-April/082599.html
    
    Change-Id: If719d183d2ce15fa4877cd8bbf457d79097765be
    Reviewed-on: https://gerrit.libreoffice.org/71510
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/include/comphelper/scopeguard.hxx b/include/comphelper/scopeguard.hxx
index 60836a7661c7..6b5b397686f4 100644
--- a/include/comphelper/scopeguard.hxx
+++ b/include/comphelper/scopeguard.hxx
@@ -24,6 +24,28 @@
 #include <sal/log.hxx>
 #include <com/sun/star/uno/Exception.hpp>
 
+
+// For some reason, Android buildbot issues -Werror like this:
+//   In file included from
+//   /home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:50:
+//   /home/android/lo/master-android-arm/include/comphelper/scopeguard.hxx:36:14:
+//   error: function 'comphelper::<deduction guide for ScopeGuard><(lambda at
+//   /home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:146:34)>'
+//   has internal linkage but is not defined [-Werror,-Wundefined-internal]
+//       explicit ScopeGuard( Func && func ) : m_func( std::move(func) ) {}
+//                ^
+//   /home/android/lo/master-android-arm/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx:146:28:
+//   note: used here
+//       comphelper::ScopeGuard guard([&]() {
+//                              ^
+#ifdef ANDROID
+#if defined __clang__
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wundefined-internal"
+#endif
+#endif
+
+
 namespace comphelper {
 
 /** ScopeGuard to ease writing exception-safe code.
@@ -69,6 +91,12 @@ private:
 
 } // namespace comphelper
 
+#ifdef ANDROID
+#if defined __clang__
+#pragma clang diagnostic pop
+#endif
+#endif
+
 #endif // ! defined(INCLUDED_COMPHELPER_SCOPEGUARD_HXX)
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list