A tool for static C/C++ code analysis

Edit Package cppcheck
http://cppcheck.wiki.sourceforge.net/

This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck is versatile. You can check non-standard code that includes various compiler extensions, inline assembly code, etc. Checking covers for example these errors:

* Out of bounds
* Uninitialized member variable 'classname::varname'
* Using 'memfunc' on class
* Using 'memfunc' on struct that contains a 'std::classname'
* Class Base which is inherited by class Derived does not have a virtual destructor
* Memory leak: varname
* Resource leak: varname
* Deallocating a deallocated pointer: varname
* Using 'varname' after it is deallocated / released
* Invalid radix in call to strtol or strtoul. Must be 0 or 2-36
* Overlapping data buffer varname
* Unsigned division. The result will be wrong.
* Unusual pointer arithmetic

See http://cppcheck.wiki.sourceforge.net/ for more details.

Refresh
Refresh
Source Files
Filename Size Changed
cppcheck-1.59.tar.bz2 0001243616 1.19 MB
cppcheck.changes 0000005025 4.91 KB
cppcheck.spec 0000002301 2.25 KB
Revision 34 (latest revision is 134)
Marcus Meissner's avatar Marcus Meissner (msmeissn) accepted request 164061 from Danny Al-Gaaf's avatar Danny Al-Gaaf (dalgaaf) (revision 34)
- update to 1.59:
 * Commandline/Settings changes:
   - New option to enable warnings but not style messages: 
     --enable=warning
   - Cppcheck used to skip includes where the header filename 
     is enclosed in <>. You can now include these headers also by 
     using -I. 
 * New checks:
   - New POSIX checks: pipe() buffer size, redundant calls of 
     set/get user id, too big value passed to usleep(), buffer 
     overflow when using write()
   - Storing getc() return value in char variable and comparing 
     to EOF.
   - Detect redundant bitand operations
   - Find suspicious equality comparisons like: if(a == 0) a == 1;
   - Warn about using malloc() for classes containing virtual
     methods, std::-objects or constructors
   - Portability check that warns when using NULL as argument to 
     variadic function. It has undefined behaviour on some 
     implementations.
 * Improvements:
   - Improved lookup for functions and types
   - Switched to TinyXml2 as XML library
   - Improved checking for uninitialized struct members, 
     variable scopes that can be reduced and unused functions
 * GUI:
   - Remember last path in open file dialog
   - Added command line parameter to open a results file
   - Bug in statistic calculation fixed
Comments 0
openSUSE Build Service is sponsored by