summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-12-04 16:51:28 +0100
committerAndras Timar <andras.timar@collabora.com>2021-05-06 12:47:24 +0200
commit51d4d71637ae3f896be65d31b9a1b84f104a6173 (patch)
treea18c9321969eaefd1021e63fc0488258b7dfdc54
parentbe5e836d0f3e87e5de2b35b01475dfe3afeb698c (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> (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 68c3e881caa4..9117cee8f501 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>
@@ -143,6 +144,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;