FLTK logo

STR #3529

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 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

Return to Bugs & Features | SVN ⇄ GIT ]

STR #3529

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:2 - Low, e.g. a documentation error or undocumented side-effect
Scope:3 - Applies to all machines and operating systems
Subsystem:Core Library
Summary:Fix compiler warnings
Version:1.4-current
Created By:AlbrechtS
Assigned To:AlbrechtS
Fix Version:1.4.0
Fix Commit:cb387bd6ff0489bc1be8896ab7d90e17750874e3
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 AlbrechtS
06:23 Aug 29, 2019
warnings.txt
20k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#1 AlbrechtS
05:24 Aug 29, 2019
There are a lot of compiler warnings with recent gcc versions (7.x and 8.x). We should try to fix all these warnings.

Exceptions: two warnings related to deprecated functions are well-known and can't be fixed easily. We can leave these unless someone finds a good solution. These warnings are listed in the attached file 'warnings.txt' but can be ignored for now.

Files with compiler warnings:

src/Fl_File_Chooser2.cxx
src/Fl_Help_View.cxx
src/Fl_x.cxx [1]
src/Fl_File_Icon2.cxx
fluid/template_panel.cxx
fluid/undo.cxx
test/colbrowser.cxx
test/file_chooser.cxx

[1] Exception [-Wdeprecated-declarations], see above.

For all other warnings see attached log file which was compiled on Linux with gcc 8.3.

Configure / make command line (with all defaults):

$ make distclean
$ CC=gcc-8 CXX=g++-8 make

Summary of issued gcc/g++ warnings:

[-Wdeprecated-declarations]
[-Wformat-overflow=]
[-Wformat-truncation=]
 
 
#2 AlbrechtS
08:36 Aug 29, 2019
Fixed two warnings in fluid:

ba8db654f: fluid/undo.cxx
6e683783f: fluid/template_panel.cxx

Remaining warnings in files:

src/Fl_File_Chooser2.cxx
src/Fl_Help_View.cxx
src/Fl_File_Icon2.cxx

test/colbrowser.cxx
test/file_chooser.cxx
 
 
#3 AlbrechtS
09:00 Aug 29, 2019
Fixed two warnings in test.

50ee013a0: test/colbrowser.cxx and test/file_chooser.cxx

Remaining warnings in files:

src/Fl_File_Chooser2.cxx
src/Fl_Help_View.cxx
src/Fl_File_Icon2.cxx
 
 
#4 AlbrechtS
09:58 Aug 29, 2019
Fixed in Git repository.

Remaining compiler warnings are now fixed in commit cb387bd6f.

Note: The solution of potential format (buffer) overflows was to increase buffer (variable) sizes.

I'm aware that some of the resultant buffers could theoretically contain filename strings longer than FL_PATH_MAX [1] which would likely result in errors opening such files. This seems to be better than buffer overflows though.

----

[1] The typical case is to concatenate a directory string and a filename. Since both variables are of size FL_PATH_MAX the resultant string could be longer than FL_PATH_MAX which should not happen in reality.
 
     

Return to Bugs & Features ]

 
 

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'.