summaryrefslogtreecommitdiff
path: root/src/Fl_Graphics_Driver.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-01-15 21:23:26 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-01-15 21:23:26 +0100
commitdfaab4ae9004fa636bb11fdc4846a11a16e81ebb (patch)
treef958ef65e4104c15f66a3e144776f41a95385f0e /src/Fl_Graphics_Driver.cxx
parent3265d439f351d3a4d48bb1f99047f24134f1e5aa (diff)
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.
Diffstat (limited to 'src/Fl_Graphics_Driver.cxx')
-rw-r--r--src/Fl_Graphics_Driver.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Fl_Graphics_Driver.cxx b/src/Fl_Graphics_Driver.cxx
index b6781914e..6eb670348 100644
--- a/src/Fl_Graphics_Driver.cxx
+++ b/src/Fl_Graphics_Driver.cxx
@@ -3,7 +3,7 @@
//
// Fl_Graphics_Driver class for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2018 by Bill Spitzak and others.
+// Copyright 2010-2020 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
@@ -463,7 +463,13 @@ void Fl_Graphics_Driver::polygon(int x0, int y0, int x1, int y1, int x2, int y2)
void Fl_Graphics_Driver::push_clip(int x, int y, int w, int h) {}
/** see fl_clip_box() */
-int Fl_Graphics_Driver::clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) {return 0;}
+int Fl_Graphics_Driver::clip_box(int x, int y, int w, int h, int &X, int &Y, int &W, int &H) {
+ X = x;
+ Y = y;
+ W = w;
+ H = h;
+ return 0; // completely inside
+}
/** see fl_not_clipped() */
int Fl_Graphics_Driver::not_clipped(int x, int y, int w, int h) {return 1;}