FLTK logo

[master] aa14097 - Remove compilation warnings about signed/unsigned comparison.

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] aa14097 - Remove compilation warnings about signed/unsigned comparison. "ManoloFLTK" Nov 19, 2020  
 
commit aa140973a386b16130289c1a8c97b9ae6712ee98
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Nov 19 16:13:02 2020 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu Nov 19 16:13:02 2020 +0100

    Remove compilation warnings about signed/unsigned comparison.

 src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index 7815fbd..c7a8112 100644
--- src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -652,8 +652,8 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i
   unsigned int depth_return;
   XGetGeometry(fl_display, fl_window, &root_return, &x_return, &y_return, &winW,
                &winH, &border_width_return, &depth_return);
-  if (X+W > winW) W = winW-X;
-  if (Y+H > winH) H = winH-Y;
+  if (X+W > (int)winW) W = (int)winW-X;
+  if (Y+H > (int)winH) H = (int)winH-Y;
   if (W <= 0 || H <= 0) return;
   int ld = img->ld();
   if (ld == 0) ld = img->data_w() * img->d();
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'.