[Libreoffice-commits] core.git: libreofficekit/qa
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Mon Dec 9 15:26:04 UTC 2019
libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 9631f5d35d1870faf4ca2a19fe30b827a1f59905
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Dec 9 15:13:59 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Mon Dec 9 16:25:00 2019 +0100
Prefer O3TL_UNREACHABLE over assert(false)
...so that -Werror=maybe-uninitialized is also silenced (cf.
281f3d5c418e50a2858619633ebca290bd626c03 "Silence -Werror=maybe-uninitialized")
with --disable-assert-always-abort
Change-Id: Ie31e18d27823b061375a0740b85bec95740bbecd
Reviewed-on: https://gerrit.libreoffice.org/84752
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index 10b9de01d9a0..43037b5059f5 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -9,7 +9,6 @@
#include <gtk/gtk.h>
-#include <cassert>
#include <cmath>
#include <iostream>
@@ -21,6 +20,7 @@
#include <map>
#include <boost/property_tree/json_parser.hpp>
#include <o3tl/optional.hxx>
+#include <o3tl/unreachable.hxx>
namespace {
@@ -150,7 +150,7 @@ static bool gtv_calc_header_bar_draw_impl(GtkWidget* pWidget, cairo_t* pCairo)
}
else
{
- assert(false); // should never happen
+ O3TL_UNREACHABLE; // should never happen
}
gtv_calc_header_bar_draw_text(pCairo, aRectangle, rHeader.m_aText);
More information about the Libreoffice-commits
mailing list