Entwicklerblog - Collection Studio - Sammler-Software

Benutzerkonto erstellen | Haben Sie Ihr Kennwort vergessen? |



Collection Studio 4.76

[ Datum: 31 Mai 2024 ]







Kategorien

Sammler Themen/Kategorien:

Tags

Verwenden Sie Tags unten, um eine erforderliche Artikel im Blog zu finden:

5 years art auction Australia award bank banknote banknotes Belarus bill bills Books Brazil Canada cars cat celebrity China coin coin stacking coins collage collection collector collectors competition cool CS currency Czech Republic design dollar dollars euro face flag France fun funny germany hobby India Japan king library medals Mexico microscope mint money moneygami museum news NYC Olympic Games paper money penny photo Pound review riddle rouble Royal Mint ruble rubles rupee Russia scotland set sightseeing Soviet Union stamp stamps Switzerland travel tree Ukraine United Kingdom United States video vinyl war won ww2 yuan

Entwicklerblog

Dezember 20
2011

Cppcheck and CollectionStudio

We always try to keep our software with high quality level as much as possible. The fault-tolerance computing comes first during development. Nevertheless high skilled professionals in programming cannot discover all possible problems in source code of the programs during development and testing. Therefore we have started to use a very nice semantic analyser – cppcheck.

Cppcheck is an static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).

In spite of there are limits of cppcheck, it shows rather good results in analysis. Just imagine this statistics:

Number of files scanned: 430
Scan duration: 1 hour and 3 minutes
Errors: 88
Warnings: 1026
Style warnings: 1017
Portability warnings: 159
Performance warnings: 424

During last weeks we have fixed following issues, reported by cppcheck:

  • Mismatching allocation and deallocation
  • Memory leak
  • Common realloc mistake: 'm_pBuffer' nulled but not freed upon failure
  • Unused variables declared;
  • Unused private function
  • Variable 't_bExistInList' is assigned a value that is never used
  • The scope of the variable 'i' can be reduced
  • Checking if unsigned variable 'a_nIndex' is positive is always true.

Errors: 6
Warnings: 672
Style warnings: 933
Portability warnings: 1
Performance warnings: 6

All these remaining issues were checked but not fixed, because they will neither enhance program flow nor program development. Anyway we will come back to this analyser time to time in future.

Posted by serge, 20 Dezember 2011. Post has 0 comments.
analysis code CollectionStudio cppcheck errors warnings

 

blog: last 10 posts; rss 0.91 blog: last 10 posts; rss 2.0 blog: last 10 posts; rss atom 0.3 ?