[gtksourceview] gutter: fix Coverity defect in begin_draw()



commit 26b831dd29dbd78dded406cbb51b981ebe5c2ca6
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Jan 22 11:30:31 2017 +0100

    gutter: fix Coverity defect in begin_draw()
    
    When assigning background_area to cell_area, background_area.width is
    uninitialized. The width field is assigned to background_area and
    cell_area later, so there were no problems in the code, this commit is
    just to make Coverity happy.

 gtksourceview/gtksourcegutter.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourcegutter.c b/gtksourceview/gtksourcegutter.c
index 4eb16e6..2aeeb02 100644
--- a/gtksourceview/gtksourcegutter.c
+++ b/gtksourceview/gtksourcegutter.c
@@ -888,7 +888,7 @@ begin_draw (GtkSourceGutter *gutter,
            LinesInfo       *info,
            cairo_t         *cr)
 {
-       GdkRectangle background_area;
+       GdkRectangle background_area = { 0 };
        GdkRectangle cell_area;
        GList *l;
        gint renderer_num;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]