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. It is still not required to include these headers so feel free to try it and then include the headers that give you the best results. The biggest problem with including many headers is that analysis gets slow.
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
Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.
* Drop cmake support (upstream does not cmake anymore)
* To build GUI, qmake is needed
Changelog:
* Bug fixes
* Many improvements
* Improve translations
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) {
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.
New check: sizeof used on array variable that is a function parameter.
The expected bahaviour is most likely that the sizeof result is
the size of the array, but the actual sizeof result is the size of
the pointer.
New check: catching exception by value. It is better to catch by
reference for various reasons.
New check: memset calls filling 0 bytes. The given size might be
wrong.