FLTK logo

[master] 40f376a - Fix two new Visual Studio compiler warnings

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] 40f376a - Fix two new Visual Studio compiler warnings "Albrecht Schlosser" Nov 24, 2022  
 
commit 40f376a6f707e6c5ae69c0f73300575bd79e28e3
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Thu Nov 24 17:29:26 2022 +0100
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Thu Nov 24 17:29:26 2022 +0100

    Fix two new Visual Studio compiler warnings

 src/Fl_SVG_Image.cxx | 2 +-
 src/fl_draw.cxx      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git src/Fl_SVG_Image.cxx src/Fl_SVG_Image.cxx
index ca52a55..a615ccb 100644
--- src/Fl_SVG_Image.cxx
+++ src/Fl_SVG_Image.cxx
@@ -119,7 +119,7 @@ static char *svg_inflate(gzFile gzf, // can be a file or the read end of a pipe
   do {
     if (is_compressed && p + size > out + out_size) {
       out_size += size;
-      unsigned delta = (p - out);
+      size_t delta = (p - out);
       out = (char*)realloc(out, out_size + 1);
       p = out + delta;
     }
diff --git src/fl_draw.cxx src/fl_draw.cxx
index d5395c3..2ed733d 100644
--- src/fl_draw.cxx
+++ src/fl_draw.cxx
@@ -79,8 +79,8 @@ static const char* expand_text_(const char* from, char*& buf, int maxbuf, double
     if (o > e) {
       if (maxbuf) break; // don't overflow buffer
       l_local_buff += int(o - e) + 200; // enlarge buffer
-      unsigned delta_o = (o - local_buf);
-      unsigned delta_end = (word_end - local_buf);
+      size_t delta_o = (o - local_buf);
+      size_t delta_end = (word_end - local_buf);
       local_buf = (char*)realloc(local_buf, l_local_buff);
       e = local_buf + l_local_buff - 4; // update pointers to buffer content
       o = local_buf + delta_o;
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'.