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
Original issue reported on code.google.com by
ettl.mar...@gmail.com
on 7 Mar 2009 at 10:24Attachments: