summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-04 16:51:28 +0100
committerAndras Timar <andras.timar@collabora.com>2021-10-19 13:57:45 +0200
commit2f49d6b7ff456134f44378fb131fff5ae0f29103 (patch)
tree3bda1d4536b35fac279c4967cfdfaa3ffff3e4ab
parentofz#27817 null deref (diff)
downloadcore-2f49d6b7ff456134f44378fb131fff5ae0f29103.tar.gz
core-2f49d6b7ff456134f44378fb131fff5ae0f29103.zip
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> (cherry picked from commit 281f3d5c418e50a2858619633ebca290bd626c03)
-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 619b2a87b13f..9a454c61ba52 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>
@@ -132,6 +133,10 @@ static gboolean gtv_calc_header_bar_draw_impl(GtkWidget* pWidget, cairo_t* pCair
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;