Download Source Package cppcheck:
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 * - 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 * - Unused functions * Check for functions that are never called
|
|
|
| Architecture | Version | Package Size | Installed Size | Files |
|---|---|---|---|---|
| alpha | 1.38-1 | 312.2 kB | 752 kB | [list of files] |
| amd64 | 1.38-1 | 286.8 kB | 552 kB | [list of files] |
| armel | 1.38-1 | 275.1 kB | 552 kB | [list of files] |
| avr32 (unofficial port) | 1.38-1 | 322.0 kB | 568 kB | [list of files] |
| hppa | 1.38-1 | 323.9 kB | 648 kB | [list of files] |
| hurd-i386 | 1.38-1 | 285.4 kB | 596 kB | [list of files] |
| i386 | 1.38-1 | 285.5 kB | 596 kB | [list of files] |
| ia64 | 1.38-1 | 382.5 kB | 1080 kB | [list of files] |
| kfreebsd-amd64 | 1.38-1 | 287.1 kB | 576 kB | [list of files] |
| kfreebsd-i386 | 1.38-1 | 285.5 kB | 576 kB | [list of files] |
| m68k (unofficial port) | 1.34-1 | 187.2 kB | 548 kB | [list of files] |
| mips | 1.38-1 | 289.5 kB | 784 kB | [list of files] |
| mipsel | 1.38-1 | 288.6 kB | 784 kB | [list of files] |
| powerpc | 1.38-1 | 298.3 kB | 640 kB | [list of files] |
| s390 | 1.38-1 | 278.2 kB | 592 kB | [list of files] |
| sparc | 1.38-1 | 298.9 kB | 632 kB | [list of files] |