@danielmarjamaki recommended to include the project via JSONDB -file. IAR as of version 9 can create a JSON file from the project, which I passed to CPPcheck.
However, the output now only shows functions that are not used [unusedFunction].
If I check the files individually (passed directly) or the entire project (project directory), then various other errors are displayed. However, when using the JSON file, they do not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There has been a couple of fixes in the import of compile databases. If you want you could try to install cppcheck-2.7.5 and see if issues has been fixed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi @danielmarjamaki
thank you very much for your answer. I just installed version 2.7.5 and then nighty build 776. Both throw a syntax error with the last closing ] brace of the json file when calling the compile-database file.
Checking the file with https://jsonlint.com/ showed that it is error-free.
UPDATE:
This is no error, wrong syntax from me. Correct would have been:
`D:\Projekte\xyz\firmware\app\Debug>c:\Programme\Cppcheck\cppcheck.exe --project=jsondb.json``
With this it works!
Thanks a lot!
Last edit: Karsten Beck 2022-04-27
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The basis of this problem is the topic https://sourceforge.net/p/cppcheck/discussion/general/thread/608af51e0a/?limit=25#98b6
(CPPcheck does not include files from the Project Options)
@danielmarjamaki recommended to include the project via JSONDB -file. IAR as of version 9 can create a JSON file from the project, which I passed to CPPcheck.
However, the output now only shows functions that are not used [unusedFunction].
If I check the files individually (passed directly) or the entire project (project directory), then various other errors are displayed. However, when using the JSON file, they do not.
Doesn't anyone have any ideas on how I can proceed?
@danielmarjamaki Do you have any idea where the problem might be?
There has been a couple of fixes in the import of compile databases. If you want you could try to install cppcheck-2.7.5 and see if issues has been fixed.
Hi @danielmarjamaki
thank you very much for your answer. I just installed version 2.7.5 and then nighty build 776. Both throw a syntax error with the last closing ] brace of the json file when calling the compile-database file.
Checking the file with https://jsonlint.com/ showed that it is error-free.
Is there maybe another bug here?
Best wishes
Karsten
Last edit: Karsten Beck 2022-04-27
try:
Last edit: Daniel Marjamäki 2022-04-27
UPDATE:
This is no error, wrong syntax from me. Correct would have been:
`D:\Projekte\xyz\firmware\app\Debug>c:\Programme\Cppcheck\cppcheck.exe --project=jsondb.json``
With this it works!
Thanks a lot!
Last edit: Karsten Beck 2022-04-27