diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-29 11:36:51 +0300 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2019-06-05 22:19:36 +0200 |
commit | 1a455c44efd35f7abb69381b8752eac50eeba37e (patch) | |
tree | ca0b9c665ec21fc050dbdf5a49aa26d0d16fde9a | |
parent | 26cf5cdb99b7be5afaa0bad7f3d1b7d7b8c4c783 (diff) |
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@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | include/comphelper/scopeguard.hxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/comphelper/scopeguard.hxx b/include/comphelper/scopeguard.hxx index 47b62b5f234e..8b5ee4fa2147 100644 --- a/include/comphelper/scopeguard.hxx +++ b/include/comphelper/scopeguard.hxx @@ -24,6 +24,28 @@ #include <functional> + +// 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. @@ -55,6 +77,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: */ |