summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.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/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.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/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index 688457a24..8fed7834b 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -3,7 +3,7 @@
//
// Image drawing routines for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2018 by Bill Spitzak and others.
+// Copyright 1998-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
@@ -474,8 +474,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H,
{
if (!linedelta) linedelta = W*abs(delta);
- int dx, dy, w, h;
- fl_clip_box(X,Y,W,H,dx,dy,w,h);
+ int dx = 0, dy = 0, w = 0, h = 0;
+ fl_clip_box(X, Y, W, H, dx, dy, w, h);
if (w<=0 || h<=0) return;
dx -= X;
dy -= Y;