squeeze  ] [  sid  ]
[ Source: cppcheck  ]

Package: cppcheck (1.38-1 and others)

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
 * - 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

Tags: Software Development: C Development, C++ Development, Testing and QA, Implemented in: C++, User Interface: Command Line, Role: Program, Scope: Utility, Purpose: Analysing, Checking, Works with: Source Code

Other Packages Related to cppcheck

  • depends
  • recommends
  • suggests
  • dep: libc0.1 (>= 2.3) [kfreebsd-amd64, kfreebsd-i386]
    GNU C Library: Shared libraries
    also a virtual package provided by libc0.1-udeb
  • dep: libc0.3 (>= 2.10) [hurd-i386]
    GNU C Library: Shared libraries
    also a virtual package provided by libc0.3-udeb
  • dep: libc6 (>= 2.1.3) [i386, powerpc, s390]
    GNU C Library: Shared libraries
    also a virtual package provided by libc6-udeb
    dep: libc6 (>= 2.2) [hppa, mips, mipsel]
    dep: libc6 (>= 2.2.5) [amd64]
    dep: libc6 (>= 2.4) [armel]
    dep: libc6 (>= 2.5) [avr32]
    dep: libc6 (>= 2.5-5) [m68k]
    dep: libc6 (>= 2.6) [sparc]
  • dep: libc6.1 (>= 2.1.3) [alpha]
    GNU C Library: Shared libraries
    also a virtual package provided by libc6.1-udeb
    dep: libc6.1 (>= 2.2) [ia64]
  • dep: libgcc1 (>= 1:4.1.1) [not armel, avr32, hppa, hurd-i386, kfreebsd-amd64, kfreebsd-i386, m68k]
    GCC support library
    dep: libgcc1 (>= 1:4.2.1) [avr32]
    dep: libgcc1 (>= 1:4.4) [kfreebsd-amd64, kfreebsd-i386]
    dep: libgcc1 (>= 1:4.4.0) [armel]
    dep: libgcc1 (>= 4.2.1) [hurd-i386]
  • dep: libgcc2 (>= 4.2.1) [m68k]
    Package not available
  • dep: libgcc4 (>= 4.1.1) [hppa]
    GCC support library
  • dep: libstdc++6 (>= 4.1.1) [m68k]
    The GNU Standard C++ Library v3
    dep: libstdc++6 (>= 4.2.1) [not armel, kfreebsd-amd64, kfreebsd-i386, m68k]
    dep: libstdc++6 (>= 4.4) [kfreebsd-amd64, kfreebsd-i386]
    dep: libstdc++6 (>= 4.4.0) [armel]
  • dep: libunwind7 [ia64]
    A library to determine the call-chain of a program - runtime

Download cppcheck

Download for all available architectures
Architecture Version Package Size Installed Size Files
alpha 1.38-1 312.2 kB752 kB [list of files]
amd64 1.38-1 286.8 kB552 kB [list of files]
armel 1.38-1 275.1 kB552 kB [list of files]
avr32 (unofficial port) 1.38-1 322.0 kB568 kB [list of files]
hppa 1.38-1 323.9 kB648 kB [list of files]
hurd-i386 1.38-1 285.4 kB596 kB [list of files]
i386 1.38-1 285.5 kB596 kB [list of files]
ia64 1.38-1 382.5 kB1080 kB [list of files]
kfreebsd-amd64 1.38-1 287.1 kB576 kB [list of files]
kfreebsd-i386 1.38-1 285.5 kB576 kB [list of files]
m68k (unofficial port) 1.34-1 187.2 kB548 kB [list of files]
mips 1.38-1 289.5 kB784 kB [list of files]
mipsel 1.38-1 288.6 kB784 kB [list of files]
powerpc 1.38-1 298.3 kB640 kB [list of files]
s390 1.38-1 278.2 kB592 kB [list of files]
sparc 1.38-1 298.9 kB632 kB [list of files]