summaryrefslogtreecommitdiff
path: root/libreofficekit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-04 16:51:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-12-04 20:10:38 +0100
commit281f3d5c418e50a2858619633ebca290bd626c03 (patch)
treef769df9b2ea2432980550ce4eb0683031a4d83f9 /libreofficekit
parent75af93817243dbc24dafc2a4829dfbb4abfe6803 (diff)
Silence -Werror=maybe-uninitialized
...where the members of aRectangle passed into gtv_calc_header_bar_draw_text (and unconditionally used there, see the definition further up in this file) are only set for ROW and COLUMN types. Lets assume that no other types can happen here? (This is part of libreofficekit/Executable_gtktiledviewer.mk, see libreofficekit/README for how to execute it.) Change-Id: I487be241e564127183751758710140ab24941f63 Reviewed-on: https://gerrit.libreoffice.org/84424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'libreofficekit')
-rw-r--r--libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
index a332d9608551..10b9de01d9a0 100644
--- a/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx
@@ -9,6 +9,7 @@
#include <gtk/gtk.h>
+#include <cassert>
#include <cmath>
#include <iostream>
@@ -147,6 +148,10 @@ static bool gtv_calc_header_bar_draw_impl(GtkWidget* pWidget, cairo_t* pCairo)
cairo_rectangle(pCairo, aRectangle.x, aRectangle.height, aRectangle.width, 1);
cairo_fill(pCairo);
}
+ else
+ {
+ assert(false); // should never happen
+ }
gtv_calc_header_bar_draw_text(pCairo, aRectangle, rHeader.m_aText);
nPrevious = rHeader.m_nSize;