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/Android/Fl_Android_Window_Driver.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/drivers/Android') diff --git a/src/drivers/Android/Fl_Android_Window_Driver.cxx b/src/drivers/Android/Fl_Android_Window_Driver.cxx index 5781c0361..7a3e276fd 100644 --- a/src/drivers/Android/Fl_Android_Window_Driver.cxx +++ b/src/drivers/Android/Fl_Android_Window_Driver.cxx @@ -3,7 +3,7 @@ // // Definition of Android window driver. // -// Copyright 2018 by Bill Spitzak and others. +// Copyright 2018-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 @@ -510,7 +510,8 @@ void Fl_WinAPI_Window_Driver::flush_double() fl_end_offscreen(); } - int X,Y,W,H; fl_clip_box(0,0,w(),h(),X,Y,W,H); + int X = 0, Y = 0, W = 0, H = 0; + fl_clip_box(0, 0, w(), h(), X, Y, W, H); if (other_xid) fl_copy_offscreen(X, Y, W, H, other_xid, X, Y); } @@ -540,7 +541,8 @@ void Fl_WinAPI_Window_Driver::flush_overlay() } if (eraseoverlay) fl_clip_region(0); - int X, Y, W, H; fl_clip_box(0, 0, w(), h(), X, Y, W, H); + int X = 0, Y = 0, W = 0, H = 0; + fl_clip_box(0, 0, w(), h(), X, Y, W, H); if (other_xid) fl_copy_offscreen(X, Y, W, H, other_xid, X, Y); if (overlay() == oWindow) oWindow->draw_overlay(); -- cgit v1.2.3