Lxrd-AJ / gnuplot-cpp

Automatically exported from code.google.com/p/gnuplot-cpp
0 stars 0 forks source link

checked project with c++-static-code analysis tool and brought up issues #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. cppcheck -a --style gnuplot-cpp/
2. Checking gnuplot-cpp-read-only/example.cc...
[gnuplot-cpp-read-only/gnuplot_i.hpp:553]: (style) Member variable not
initialized in the constructor 'Gnuplot::nplots'
[gnuplot-cpp-read-only/gnuplot_i.hpp:553]: (style) Member variable not
initialized in the constructor 'Gnuplot::two_dim'
[gnuplot-cpp-read-only/gnuplot_i.hpp:553]: (style) Member variable not
initialized in the constructor 'Gnuplot::valid'
[gnuplot-cpp-read-only/gnuplot_i.hpp:553]: (style) Member variable not
initialized in the constructor 'Gnuplot::gnucmd'
[gnuplot-cpp-read-only/gnuplot_i.hpp:563]: (style) Member variable not
initialized in the constructor 'Gnuplot::nplots'
[gnuplot-cpp-read-only/gnuplot_i.hpp:563]: (style) Member variable not
initialized in the constructor 'Gnuplot::two_dim'
[gnuplot-cpp-read-only/gnuplot_i.hpp:563]: (style) Member variable not
initialized in the constructor 'Gnuplot::valid'
[gnuplot-cpp-read-only/gnuplot_i.hpp:563]: (style) Member variable not
initialized in the constructor 'Gnuplot::gnucmd'
[gnuplot-cpp-read-only/gnuplot_i.hpp:583]: (style) Member variable not
initialized in the constructor 'Gnuplot::nplots'
[gnuplot-cpp-read-only/gnuplot_i.hpp:583]: (style) Member variable not
initialized in the constructor 'Gnuplot::two_dim'
[gnuplot-cpp-read-only/gnuplot_i.hpp:583]: (style) Member variable not
initialized in the constructor 'Gnuplot::valid'
[gnuplot-cpp-read-only/gnuplot_i.hpp:583]: (style) Member variable not
initialized in the constructor 'Gnuplot::gnucmd'
[gnuplot-cpp-read-only/gnuplot_i.hpp:604]: (style) Member variable not
initialized in the constructor 'Gnuplot::nplots'
[gnuplot-cpp-read-only/gnuplot_i.hpp:604]: (style) Member variable not
initialized in the constructor 'Gnuplot::two_dim'
[gnuplot-cpp-read-only/gnuplot_i.hpp:604]: (style) Member variable not
initialized in the constructor 'Gnuplot::valid'
[gnuplot-cpp-read-only/gnuplot_i.hpp:604]: (style) Member variable not
initialized in the constructor 'Gnuplot::gnucmd'

The member variables of class Gnuplot are not initialized with default
variables in the constructors. If have modified the code, now they are
intialized. 

PS: I used the static code analyis tool cppcheck to find this issues. 
http://cppcheck.wiki.sourceforge.net/

I have attached the modified file (gnuplot_i.hpp)

The modified version was tested on Ubuntu Linux 8.10. With gcc-4.3.2 with
no errors or warnings.

Best Regards 

Ettl Martin

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ettl.mar...@gmail.com on 7 Mar 2009 at 10:24

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks for the information.  Patch has been applied (with minor modifications).

Original comment by jeremit0@gmail.com on 12 Mar 2009 at 5:04