FLTK logo

[master] d851106 - Prevent compilation warning about uninitialized variables.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] d851106 - Prevent compilation warning about uninitialized variables. "ManoloFLTK" Nov 27, 2020  
 
commit d851106f47314680fb619fb94f97878a7d5fbed6
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Fri Nov 27 09:17:20 2020 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Fri Nov 27 09:17:33 2020 +0100

    Prevent compilation warning about uninitialized variables.

 src/drivers/X11/Fl_X11_Screen_Driver.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git src/drivers/X11/Fl_X11_Screen_Driver.cxx src/drivers/X11/Fl_X11_Screen_Driver.cxx
index 90a8381..539fdfd 100644
--- src/drivers/X11/Fl_X11_Screen_Driver.cxx
+++ src/drivers/X11/Fl_X11_Screen_Driver.cxx
@@ -786,7 +786,7 @@ Fl_RGB_Image *Fl_X11_Screen_Driver::read_win_rectangle(int X, int Y, int w, int
 
   if (!image) {
     // fetch absolute coordinates
-    int dx, dy, sx, sy, sw, sh;
+    int dx = 0, dy = 0, sx = 0, sy = 0, sw = 0, sh = 0;
     Window child_win;
 
     if (win) {
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.