[Libreoffice-commits] core.git: desktop/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed May 13 19:27:17 UTC 2020


 desktop/source/lib/init.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit e8fe7189a175ee00b5d76a89345137a3dc0fb8d9
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed May 13 16:59:23 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed May 13 21:26:28 2020 +0200

    Avoid -Werror=unused-variable with --disable-assert-always-abort
    
    ...as reported by e.g.
    <https://ci.libreoffice.org/job/lo_tb_random_config_linux/1977/>
    
    Change-Id: I57832496faf2377a4650a4b8c43bb3c62f6977ed
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94140
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 40e3d8b3b6a3..373deb3c7c53 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1551,8 +1551,10 @@ void CallbackFlushHandler::queue(const int type, const char* data)
         for (const CallbackData& c : m_queue)
             oss << i++ << ": [" << c.Type << "] [" << c.PayloadString << "].\n";
         SAL_INFO("lok", "Current Queue: " << oss.str());
-        for (const CallbackData& c : m_queue)
-            assert(c.validate());
+        assert(
+            std::all_of(
+                m_queue.begin(), m_queue.end(),
+                [](const CallbackData& c) { return c.validate(); }));
     }
 #endif
 


More information about the Libreoffice-commits mailing list