[Libreoffice-commits] core.git: libreofficekit/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Dec 4 19:11:44 UTC 2019


 libreofficekit/qa/gtktiledviewer/gtv-calc-header-bar.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 281f3d5c418e50a2858619633ebca290bd626c03
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Dec 4 16:51:28 2019 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Dec 4 20:10:38 2019 +0100

    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 at redhat.com>

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;


More information about the Libreoffice-commits mailing list