On 13.01.2011, at 19:36, Alexander Voigt wrote:

> Dear fltk developers,
> 
> I checked out http://svn.easysw.com/public/fltk/fltk/branches/branch-1.3/src 
> and ran 'cppcheck' (http://sourceforge.net/projects/cppcheck/) on every 
> source file via:
> 
>  $ cd src/
>  $ cppcheck *.cxx
> 
> This prints out a lot of warnings about memory allocation issues and others.  
> I just want you to know about these warnings.  Maybe you could have a look 
> into some of these before releasing FLTK 1.3 in order to make sure everything 
> works fine.
> 
> Many thanks in advance,
> Alexander Voigt

Hi ALexander,

Thanks for the link. It would have been nice if you could have added a sample 
output of this tool. Well, I ended up downloading, installing, and running it 
on the entire source tree, and it did not give me that much information (as 
expected from static analysis). So far, I get "style" messages about scope, a 
few warnings about uninitialized member variables, and a short list of errors, 
mostly about not free'ing after a failed realloc. There are a few false 
alarms... .

This is all nice, but nothing here is earth shattering (yet, it's still 
running).

 - Matthias

Examples:

[./src/Fl_Help_View.cxx:3113]: (style) The scope of the variable len can be 
reduced
[./src/Fl_Help_View.cxx:154]: (warning) Member variable not initialized in the 
constructor 'fl_margins::margins_'
[./src/Fl_Help_View.cxx:378]: (error) Common realloc mistake: "targets_" nulled 
but not freed upon failure
[./src/Fl_Input.cxx:347]: (style) Found obsolete function 'index'. It is 
recommended to use the function 'strchr' instead

(the last one is a false positive)
_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to