cppcheck News
Static source code analysis tool for C and C++ code
Brought to you by:
danielmarjamaki
We have released Cppcheck-1.82. The release notes are:
Bug fixes:
Enhancements
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".
someType **list_p = ...; if ((list_p + 1) == NULL)
The result for '(list_p + 1)' can't be NULL unless there is overflow (UB).
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