From dfaab4ae9004fa636bb11fdc4846a11a16e81ebb Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Wed, 15 Jan 2020 21:23:26 +0100 Subject: Fix uninitialized vars in calls to fl_clip_box() (issue #6) The main fixes are only to avoid static code analyzer warnings reported in issue #5, but there are also minor bug fixes included. These bug fixes are more of theoretical concerns though. Close #6. --- src/Fl_Text_Display.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Fl_Text_Display.cxx') diff --git a/src/Fl_Text_Display.cxx b/src/Fl_Text_Display.cxx index 55cf709ed..863779254 100644 --- a/src/Fl_Text_Display.cxx +++ b/src/Fl_Text_Display.cxx @@ -1,7 +1,7 @@ // // "$Id$" // -// Copyright 2001-2018 by Bill Spitzak and others. +// Copyright 2001-2020 by Bill Spitzak and others. // Original code Copyright Mark Edel. Permission to distribute under // the LGPL for the FLTK library granted by Mark Edel. // @@ -3798,7 +3798,7 @@ void Fl_Text_Display::draw(void) { // draw all of the text if (damage() & (FL_DAMAGE_ALL | FL_DAMAGE_EXPOSE)) { //printf("drawing all text\n"); - int X, Y, W, H; + int X = 0, Y = 0, W = 0, H = 0; if (fl_clip_box(text_area.x, text_area.y, text_area.w, text_area.h, X, Y, W, H)) { // Draw text using the intersected clipping box... -- cgit v1.2.3