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@redhat.com>
This commit is contained in:
parent
919375354c
commit
9631f5d35d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user