News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

The 04 September 2010 build (6570) is out.

Started by killerbot, September 04, 2010, 10:48:10 PM

Previous topic - Next topic

eckard_klotz

Hello Everybody.

Especialy to Morten: sory for my late reply.

Quote
QuoteHas anybody an idea why the cppcheck-project is able to activate the 'find by click' feature I described (and why my project is not)?
No, this works for me. Can you send a stripped sample project where it does not? Is it probably Makefile based (although this still should work)?!


I added a special test-project as zip-file. It contains 2 simple sources in the src-folder and several code::blocks projects in different folder-levels. If I activate the projects in the sub-folder "CppCheck\CppCheck\prj" or in the sub-folder "CppCheck\CppCheck\prj\CppCheck"  I'm not able to find the location associated to the cppcheck-message by click. The other 2 projects are able to find the location by click. Could it be path-problem?

Best Regards,
                    Eckard Klotz.

killerbot

I have downloaded, I will try to have a look at it this week.

killerbot

#17
I checked it.
It is not a CB issue, it seems it is an issue in cppcheck it self.

This is the result of calling cppcheck manually on the command line :

ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj> cppcheck --verbose --all --style ../../src/test.cpp
Checking ../../src/test.cpp...
[src/test.cpp:7]: (style) Unused variable: ReturnValue
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj>

As you can see : cppcheck is giving back an incorrect path  : [src/test.cpp:7]

Similar when we go even one level deeper :

ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj/CppCheck> cppcheck --verbose --all --style ../../../src/test.cpp
Checking ../../../src/test.cpp...
[../src/test.cpp:7]: (style) Unused variable: ReturnValue
ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck/prj/CppCheck>


Basically it boils down to : when the directory where cppcheck is invoked is at a deeper level then the sources to check, things start to go wrong.
The first 2 cases in your example zip file were 1 level higher, or at the same level


ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck> cppcheck --verbose --all --style ./src/test.cpp
Checking ./src/test.cpp...
[./src/test.cpp:7]: (style) Unused variable: ReturnValue



ldco@linux-jyub:~/Projects/TryOuts/Test_CppCheck/CppCheck/CppCheck> cppcheck --verbose --all --style ../src/test.cpp
Checking ../src/test.cpp...
[../src/test.cpp:7]: (style) Unused variable: ReturnValue



created a bug report for it with cppcheck : https://sourceforge.net/apps/trac/cppcheck/ticket/2059

eckard_klotz

Hello Killerbot.

Thanks for your fast checking.

Best Regards,
                   Eckard Klotz.


killerbot

and more good news, the guys of cppcheck fixed the bug. So it will be available in cppcheck 1.45

Quote
Version 1.45 is planned to be released on October 10th

So we just have to wait a few more weeks, of you can get their sources out of git, and compile it yourself ...

MortenMacFly

Quote from: eckard_klotz on September 22, 2010, 12:56:29 PM
Thanks for your fast checking.
Seems I missed this post (and the rmeinder :-(). I just saw killerbot did it. Sorry for that.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

eckard_klotz

Hello Killerbot and hello Morten.

I think you and the other developer make a great job and currently you have a lot do do with codecompletion an debuger. Thus it's OK if my problem has lower priority.

By the way, it is right that I'm not able to load up a file as my example while submitting a bug-report.

Best Regards,
                     Eckard.

MortenMacFly

Quote from: eckard_klotz on September 23, 2010, 07:02:06 PM
By the way, it is right that I'm not able to load up a file as my example while submitting a bug-report.
Yes, but you can point to relevant information /archives in the forums in the bug report. That's very convenient, usually.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

Quote from: killerbot on September 23, 2010, 09:05:43 AM
and more good news, the guys of cppcheck fixed the bug. So it will be available in cppcheck 1.45

Quote
Version 1.45 is planned to be released on October 10th

So we just have to wait a few more weeks, of you can get their sources out of git, and compile it yourself ...

Cppcheck 1.45 is out, and I have tested our test cases, and all work fine now. Thumbs up for the cppcheck guys :-)