Package: cppcheck (1.40-1) [universe]
Links for cppcheck
Ubuntu Resources:
Download Source Package cppcheck:
Maintainer:
Please consider filing a bug or asking a question via Launchpad before contacting the maintainer directly.
Original Maintainer (usually from Debian):
- Reijo Tomperi
It should generally not be necessary for users to contact the original maintainer.
External Resources:
- Homepage [cppcheck.wiki.sourceforge.net]
Similar packages:
Tool for static C/C++ code analysis
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
Other Packages Related to cppcheck
|
|
|
-
- dep: libc6 (>= 2.4)
- Embedded GNU C Library: Shared libraries
also a virtual package provided by libc6-udeb
-
- dep: libgcc1 (>= 1:4.1.1)
- GCC support library
-
- dep: libstdc++6 (>= 4.1.1)
- The GNU Standard C++ Library v3
Download cppcheck
| Architecture | Package Size | Installed Size | Files |
|---|---|---|---|
| amd64 | 360.1 kB | 932.0 kB | [list of files] |
| i386 | 349.2 kB | 860.0 kB | [list of files] |