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/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/drivers/GDI') diff --git a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx index a4f4a472c..0533b3b5f 100644 --- a/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx +++ b/src/drivers/GDI/Fl_GDI_Graphics_Driver_image.cxx @@ -3,7 +3,7 @@ // // Windows image drawing code 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 @@ -125,8 +125,8 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, if (!linedelta) linedelta = W*fl_abs(delta); - int x, y, w, h; - fl_clip_box(X,Y,W,H,x,y,w,h); + int x = 0, y = 0, w = 0, h = 0; + fl_clip_box(X, Y, W, H, x, y, w, h); if (w<=0 || h<=0) return; if (buf) buf += (x-X)*delta + (y-Y)*linedelta; -- cgit v1.2.3