Paketname | cppcheck |
Beschreibung | Tool for static C/C++ code analysis |
Archiv/Repository | Offizielles Ubuntu Archiv lucid (universe) |
Version | 1.40-1 |
Sektion | universe/devel |
Priorität | optional |
Installierte Größe | 860 Byte |
Hängt ab von | libc6 (>= 2.4), libgcc1 (>= 1:4.1.1), libstdc++6 (>= 4.1.1) |
Empfohlene Pakete | |
Paketbetreuer | Ubuntu Developers |
Quelle | |
Paketgröße | 357530 Byte |
Prüfsumme MD5 | b3f800226164aea7b1ddaa38a3c08e85 |
Prüfsumme SHA1 | 4b39acccb8ea21eb5174cf0cd4e50ef970fe6465 |
Prüfsumme SHA256 | 53a4aca2e3e1e6c6f386df4a37db1508c1e654ff1149892939decb039d14977c |
Link zum Herunterladen | cppcheck_1.40-1_i386.deb |
Ausführliche Beschreibung | This program tries to detect bugs that your C/C++ compiler don't see.
The goal is no false positives.
Your compiler can detect many problems that Cppcheck don't try to detect.
Cppcheck is versatile. You can check non-standard code that includes various
compiler extensions, inline assembly code, etc.
* -- Checks
* - Auto Variables
* Auto variables are deallocated when they go out of scope. A pointer to an
auto variable is therefore only valid as long as the auto variable is in
scope. Check:
* returning a pointer to auto variable
* assignment of an auto-variable to an effective parameter of a function
* - Bounds checking
* out of bounds checking
* - Class
* Check the code for each class.
* Missing constructors
* Are all variables initialized by the constructors?
* Warn if memset, memcpy etc are used on a class
* If it's a base class, check that the destructor is virtual
* The operator= should return a constant reference to itself
* Are there unused private functions
* - Deprecated functions
* Warn if any of these deprecated functions are used:
* mktemp
* gets
* scanf
* - Exception safety
* Checking exception safety
* Don't throw exceptions in destructors
* - Memory leaks (function variables)
* Is there any allocated memory when a function goes out of scope
* - Memory leaks (class variables)
* If the constructor allocate memory then the destructor must deallocate it.
* - Other
* Other checks
* C-style pointer cast in cpp file
* redundant if
* bad usage of the function 'strtol'
* bad usage of the function 'sprintf' (overlapping data)
* division with zero
* unsigned division
* unused struct member
* passing parameter by value
* check how signed char variables are used
* condition that is always true/false
* unusual pointer arithmetic. For example: "abc" + 'd'
* dereferencing a null pointer
* Incomplete statement
* optimisation: detect post increment/decrement
* - STL usage
* Check for invalid usage of STL:
* out of bounds errors
* misuse of iterators when iterating through a container
* dereferencing an erased iterator
* for vectors: using iterator/pointer after push_back has been used
* dangerous usage of find
* optimisation: using empty() instead of size()
* - Unused functions
* Check for functions that are never called
|