cppcheck / News: Recent posts


Command line:
* Added --relative-path

Improved checks to detect more bugs:
* improved checking for buffer overruns on dynamically allocated memory (#3569)
* when variable is compared against a value in condition, the variable value is known in the conditional block.
* null pointer checking - handle more standard functions and improved checking of loops
- more standard functions are checked (#1171, #410)
- improved checking of loops (#1927)
- dangerous conditions (#3518)
* detect more bugs related to std::find and string::find usage (#3162)
* detect more sign extension problems (#3637)
* detect redundant .c_str() for strings (#1079)
* invalid pointer cast from float* to double* (#1255)
* more strict about int vs. bool (#1877)
* Preprocessor: extract more configurations => more code is checked
* Unused functions - fixed false negatives for functions that returns reference
* Better checking of sizeof
* Improved "unused private function" checking... read more

Posted by Daniel Marjamäki 2012-04-25


No major new features. No major changes to the command line flags.

We have fixed many problems such as false positives, segmentation faults, etc.

We improved existing checks to detect more errors:
* type checking for format string parameters
* uninitialized variables
* bad std::string usage
* buffer overflow checking
* iterator used on different containers
* doublefree of pointer
* null pointers
* bad usage of isdigit/isgraph/isalpha/etc
* wrong usage of std::find
* more deprecated functions... read more

Posted by Daniel Marjamäki 2012-02-11


New checks

* wrong value passed to isgraph
* missuse of std::cout
* some warnings when sizeof is used on pointer variable
* endless loop because of unsigned comparison
* better check for missing break in switch (redundant strcpy)
* using && instead of & in expression
* wrong usage of printf/scanf/etc (format string and parameters mismatch)
* useless calls of STL functions (wrong usage)
* detect suspicicous use of semicolon after if/for/while (--inconclusive)
* added checking of readlink() usage
* boolean comparison with string literals... read more

Posted by Daniel Marjamäki 2011-12-10


New checks:
* actual initialization order of member variables is not the same as the written order. Use --inconclusive and --enable=style to enable this check.
* when first comparison is true, the 2nd comparison is always true. Example: '(x>5 && x!=1)'. Use --enable=style to enable this check.

we fixed many false positives and false negatives in existing checks.

For details, see this list of fixed tickets:

Posted by Anonymous 2011-10-08


There was many fixes of false positives and serious problems like crashes, hangs, etc.

New checks:

* Check for std::auto_ptr misuse (related to strict ownership)
* Read array and then immediately check if the array index is within limits
* assign pointer to int/long
* assign bool to pointer
* duplicate "break" statements in switch
* matching "if" and "else if" conditions when using bitwise and
* matching assigment and condition when using bitwise and
* test if unsigned value is less than zero

Posted by Anonymous 2011-08-14


Many bug fixes and improvements.

2 more checks were added:
* strcmp condition is always true
* using sizeof with constant

Posted by Anonymous 2011-06-12


Release notes for 1.48

There are no major new features in 1.48. There are more and better checks.

New check: Wrong usage of ! operator in conditions.
Example: if (!x == 0) {

New check: Use "throw" without arguments to rethrow exceptions.

New check: Comparison of substring with string literal will always/never match because size doesn't match.

New check: Postfix increment of boolean

New check: Clarify condition with parantheses (when there are assignment + comparison)
Example: if (a = b > 0) {... read more

Posted by Anonymous 2011-04-09


Release notes for 1.47

It is now possible to exclude files and folders from the analysis. Use -i on the command line (i=ignore).

Custom rules can now be created using regular expressions. To read more about creating custom rules, see http://sourceforge.net/projects/cppcheck/files/Articles/

A new XML format is launched. To use this format, the --xml-version=2 is used. The new xml format is incompatible with the xml format used in previous versions. The old XML format will still be used unless --xml-version=2 is given, so your existing scripts, tools and plugins should still work.... read more

Posted by Anonymous 2011-02-06


Release notes for 1.46

This release has improvements and bug fixes.

We fixed 153 tickets, and that is a somewhat "usual" number for a Cppcheck release.

The report has been improved. New severities were added to make the messages more informational. The possible severities are now:
* error
* warning
* style
* performance

This has no effect on the command line flags nor the xml report. The command line flags and the xml report is fully compatible with previous versions.... read more

Posted by Anonymous 2010-12-12



* project file

Command line:

* report: use system dependent path separator
* --enable: the except* is not available anymore
* --enable: the "unusedFunctions" was renamed to "unusedFunction"


* New check: Initialization of a variable by itself
* New check: dangerous usage of scanf
* More checking for obsolete and dangerous functions
* Optimisations
* C++0x updates: enums, strings... read more

Posted by Anonymous 2010-10-03


I broke out the headers checking into a separate project. Its primary purpose is to detect unnecessary includes.

The headers checking was among the first Cppcheck checks. It has been disabled for years because it doesn't work with the Cppcheck data.
Adapting the Cppcheck data for the headers checking would be complicated and it would involve disabling the Preprocessor - and that is not acceptable. Therefore it was broken out into a separate project.... read more

Posted by Anonymous 2010-07-26


* command line: a -D command was added
* GUI: minor updates

New checks:
* (style) Redundant assignment (missing break in a switch block)
* (style) Empty catch blocks
* (error) Usage of iterator pointing to invalid memory after reserve
* (error) Detect common realloc-mistake that can cause memory leaks.

Improved checks:
* Memory leaks
* Buffer overruns
* Mismatching allocation / deallocation
* Bad iterators
* Uninitialized variables
* Null pointer dereference
* Unused variable

Posted by Anonymous 2010-07-10


This release has many fixes and enhancements.

We deprecated the inconclusive checks. The "possible error" and "possible style" are not available anymore. From now on we will only work on fully conclusive checks.

Command line:
* Since we removed all inconclusive results, the "--all", "-a" and "--auto-dealloc" are deprecated. These flags can still be given but they don't have any effect.... read more

Posted by Anonymous 2010-05-08


Another hotfix release. This is more properly made than 1.41-2. With proper tagging and updating of all version numbers. But it has the same hotfix as 1.41-2

Posted by Anonymous 2010-03-09


A hotfix release

Posted by Anonymous 2010-03-09


This release has many bug fixes and minor improvements.

Command line:
* You can now specify files to check through a file instead of through command line

New checks:
* simple checking of function constness
* readded check for unused variable
* duplicate typedefs
* STL: suspicious condition when checking result of find

Core improvements:
* rewrote a few error messages, to make them easier to understand
* better handling of pointer aliasing
* improved handling of templates
* various improvements in the leaks checking
* many improvements in the enum handling
* improved handling of typedefs
* more checking for suspicious pointer arithmetic... read more

Posted by Anonymous 2010-03-07


Cppcheck-1.40 was released today

New checks:
* new style check: assignment operator does not return *this
* new style check: passing negative size to memset, etc
* new performance check: use empty() instead of checking size() against zero

Rewritten checks:
* rewrote the checking for null pointers
* rewrote the checking for uninitialized variables

Improved checks:
* improved the checking for invalid usage of auto variables
* improved the checking for leaks
* fixed a few checks so they don't bail out when finding an error - the checking continues and more errors may be detected.
* rewrote various error messages to make them easier to understand... read more

Posted by Anonymous 2010-01-17

cppcheck-1.40 delayed

Cppcheck-1.40 will not be released tomorrow as planned.

It will probably be released next weekend instead, on January 17th.

The reason for the delay is to allow us to make more improvements.

Posted by Anonymous 2010-01-09


Cppcheck 1.39 was released today.

Many fixes, refactorings and improvements.

New features:
* new flag --enable that you'll use to enable various checks. The --all and --style are deprecated
* check for uninitialized variable
* check for exception safety problems
* more checking of STL iterators

Posted by Anonymous 2009-12-06

cppcheck-1.39 delay

cppcheck-1.39 was planned to be released today.

But it is delayed. It will instead be released on december 6th.

Posted by Anonymous 2009-11-29

cppcheck-1.37 (bug fixes)

quick release to fix a few bad bugs.

Posted by Anonymous 2009-09-22


Version 1.36 has been released. This new version have many bug fixes for false positives, segmentation faults, etc. We have made many improvements to the handling of C/C++ code which means the checks is stronger.

Posted by Anonymous 2009-09-20


Version 1.36 has been released. This new version have many bug fixes for false positives, segmentation faults, etc. We have made many improvements to the handling of C/C++ code which means the checks is stronger.

Posted by Anonymous 2009-09-20


cppcheck-1.35 has been released.

Changed output:
* Renamed the severity "all" to "possible error"
* Renamed the severity "all style" to "possible style"
* Removed the severity "security"

New checks:
* invalid deallocation
* memory leaks for struct members
* Using postincrement when preincrement would be better

Improved checks:
* dereferencing null pointers
* resource leaks
* c-style pointer cast
* buffer overrun
* dereferencing iterator after using erase... read more

Posted by Anonymous 2009-08-16


The biggest news is that we now have a GUI.
It is Qt based and should therefore build on any platform.
For Windows users the GUI is available in the installation program.

We have also made many improvements in the checking.

Posted by Anonymous 2009-06-07

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks