static analysis of C/C++ code
Command line interface:
New checks:
Improvements:
Configuration:
Addons:
Performance: According to daca@home Cppcheck-1.87 is in average 10% faster than Cppcheck-1.86.
General:
Checking improvements:
New libraries:
Addons:
General:
Checking improvements:
Graphical user interface:
Misra:
New checks:
Improved checks:
Misc:
Addons:
Compiling: We dropped support for some old compilers. From now on you need gcc 4.6 or later / visual studio 2013 or later / other compiler with c++11 support.
Command line:
GUI:
Addons:
Bug fixes:
Enhancements
New check; Detect mistakes when there are multiple strcmp() in condition Example:
if (strcmp(password,"A")==0 || strcmp(password,"B")==0 || strcmp(password,"C"))
There is a missing '==0', and therefore this condition is always true except when password is "C".
New check; pointer calculation result can't be NULL unless there is overflow Example:
someType **list_p = ...;
if ((list_p + 1) == NULL)
The result for '(list_p + 1)' can't be NULL unless there is overflow (UB).
New check; public interface of classes should be safe - detect possible division by zero Example:
class Fred {
public:
void setValue(int mul, int div) {
value = mul / div; // <- unsafe
}
...
This check does not consider how Fred::setValue() is really called. If you agree that the public interface of classes should always be safe; it should be allowed to call all public methods with arbitrary arguments, then this checker will be useful.
Fixed a few false negatives
More information in the cfg files
CPPCHECK:
GUI:
Checking improvements:
Command line changes:
GUI:
Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.
General changes:
Checking improvements:
GUI:
Windows installer:
Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.
General changes:
New checks:
Checking improvements:
Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.