Prefer O3TL_UNREACHABLE over assert(false)

...so that -Werror=maybe-uninitialized is also silenced (cf.
281f3d5c41 "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@redhat.com>
This commit is contained in:
Stephan Bergmann
2019-12-09 15:13:59 +01:00
parent 919375354c
commit 9631f5d35d

View File

@@ -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);