Closed GoogleCodeExporter closed 9 years ago
Please give me the directory with the sources, otherwise I can't reproduce the
error. Probably one file is enough (Config.cpp or TestClass.cpp). Thanks
Original comment by konra...@gmx.de
on 15 Dec 2011 at 10:59
Hi!
I've modified the files somewhat, but it's still the same. Running them
from command line with
cppcheck --all --style --unused-functions .
generates the following:
Checking ./utils/Config.cpp...
[./utils/Config.cpp:23]: (style) Member variable not initialized in the
constructor 'Config::a'
[./utils/Config.h:31]: (style) Unused private function
'Config::parseDocument'
Checking usage of global functions..
Running from eclipse generates nothing.
Original comment by hmabraha...@gmail.com
on 15 Dec 2011 at 1:22
Please attach that file here.
Original comment by konra...@gmx.de
on 15 Dec 2011 at 7:59
When I execute cppcheck (1.52) from within Eclipse I see the following output
in the Eclipse console:
== Running cppcheck at 26.12.11 13:27 ==
Command line: /usr/local/cppcheck/cppcheck-1.52/cppcheck --template
{file};{line};{severity};{id};{message} --enable=all src/Config.cpp
src/Config.cpp;3;warning;uninitVar;Member variable 'Config::a' is not
initialized in the constructor.
src/Config.h;11;style;unusedPrivateFunction;Unused private function
'Config::parseDocument'
Checking src/Config.cpp...
Checking usage of global functions..
Duration 110 ms.
Also the warning markers are correctly added to the sources. It is the same
output as directly on the command line.
Please give the output from the Eclipse console when running cppcheck from
Eclipse.
Original comment by konra...@gmx.de
on 26 Dec 2011 at 12:30
Output from Eclipse console:
== Running cppcheck at 1/3/12 10:20 AM ==
Command line: /home/user/install/eclipse/dropins/cppcheck-1.52/cppcheck
--template {file};{line};{severity};{id};{message} --enable=all --enable=style
--enable=unusedFunction --enable=all --check-config utils/Config.cpp
Checking utils/Config.cpp...
Checking usage of global functions..
Duration 108 ms.
Original comment by hmabraha...@gmail.com
on 3 Jan 2012 at 9:24
I'm not sure if this is related, but I discovered that --template
{file};{line};{severity};{id};{message} isn't compliant to what cppcheck shows
me in the help.
It should be --template='{file};{line};{severity};{id};{message}'.
Otherwise it seems like other parameters like --enable=all are ignored.
Although it works from eclipse: it might be a good idea to surround the path of
the file to check with a double quote.
I'm using eclipse 3.7 with the latest cppcheclipse.
cppcheck is provided by cygwin in version 1.53.
The OS is WinXP.
Regards,
Manuel
Original comment by TheNinj...@gmail.com
on 21 Mar 2012 at 9:13
Cppcheclipse shows no issues as it is called with --check-config. Obviously
this additional parameter was given in the configuration. As soon as you remove
it, cppcheclipse will give out the correct warnings. This behaviour is equal to
the one on the command line. If you call cppcheck with --check-config, it will
not give out any warnings for the attached file.
Although the syntax --template=<format> was introduced with cppcheck 1.52 even
with the current version, the old format --template <format> is still
supported. Nevertheless I will use the new format --template=<format> with the
upcoming version of cppcheclipse and increase the minimal supported version of
cppcheck to 1.52.
Original comment by konra...@gmx.de
on 16 Jul 2012 at 6:55
Original comment by konra...@gmx.de
on 1 Sep 2012 at 3:39
Original issue reported on code.google.com by
hmabraha...@gmail.com
on 14 Dec 2011 at 11:57