Skip to content

Releases: danmar/cppcheck

Cppcheck-1.84

12 Jun 10:54
Compare
Choose a tag to compare

New checks:

  • Same rhs expression used in consecutive assignments
  • Added more misra checkers
  • Function overrides base class function but is not marked with the override keyword

Improved checks:

  • Identical inner condition
  • Opposite expressions
  • Call to virtual function in constructor or destructor
  • Variable not initialized by private constructor
  • A class that has dynamic allocation needs copy constructor, assignment operator and destructor

Misc:

  • Various performance optimisations
  • Better support for C++17
  • --template=gcc format has been updated to match gcc output better.
  • We added a --template-location that can be used to format multiline messages.
  • Update --template so the piece of code with the warning can be shown
  • Symbol-based suppressions
  • XML based suppressions format

Addons:

  • cert.py: Attempting to cast away const
  • misc.py: String concatenation in array initialization
  • misc.py: Passing struct to ellipsis function
  • misc.py: Function overrides base class function but is not marked with the virtual keyword

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.

1.83

02 Apr 08:25
Compare
Choose a tag to compare

Command line:

  • fixes in parser
  • Improved loading of platform files.

GUI:

  • few minor improvements in user interface
  • Code preview
  • Added MISRA addon integration
  • Platform can be selected in project settings
  • Fixed issue when loading xml results file

Addons:

  • We are now officially releasing our MISRA addon. So far it supports MISRA C 2012.

1.82

14 Jan 21:37
Compare
Choose a tag to compare

Bug fixes:

  • Better handling of namespaces
  • Fixed false positives
  • Fixed parsing of compile databases
  • Fixed parsing of visual studio projects

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

1.81

07 Oct 21:31
Compare
Choose a tag to compare

CPPCHECK:

  • New warning: Check if condition after an early return is overlapping and therefore always false.
  • Improved knowledge about C/C++ standard, windows, posix, wxwidgets, gnu
  • Better handling of Visual Studio projects

GUI:

  • Compile: Qt5 is now needed to build the GUI
  • Compile: New qmake flag HAVE_QCHART
  • Project: You can now run cppcheck-addons
  • Project: We have integrated clang-tidy
  • Results view: Reload last results (if cppcheck build dir is used) when GUI is started
  • Results view: Tag the warnings with custom keywords (bug/todo/not important/etc..)
  • Results view: Shows when warning first appeared (since date)
  • Results view: Suppress warnings through right-click menu
  • Statistics: Added charts (shown if Qt charts module is enabled during build)

Cppcheck 1.80

29 Jul 14:16
Compare
Choose a tag to compare

Checking improvements:

  • Added platform for Atmel AVR 8 bit microcontrollers (avr8)
  • Better 'callstacks' in cppcheck messages
  • Improved gnu.cfg, posix.cfg, wxwidgets.cfg and std.cfg, added motif.cfg
  • Various improvements to AST, ValueFlow analysis and template parsing

Command line changes:

  • Deprecated command line argument --append has been removed
  • New command line argument --plist-output to create .plist files
  • New command line argument --output-file to print output to file directly
  • Check OpenCL files (.cl)

GUI:

  • Support export of statistics to PDF
  • Several small usability improvements

Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.

1.79

13 May 13:07
Compare
Choose a tag to compare

General changes:

  • C++ code in C files is rejected now (use --language=c++ to enforce checking the code as C++)
  • Write function access type to XML dump

Checking improvements:

  • Improved configuration extraction in preprocessor
  • Improved accuracy of AST
  • Improved template parsing
  • Improved support for (STL) containers in SymbolDatabase
  • Improved support for C++11's 'auto' type
  • Experimental support for uninitialized variables in ValueFlow analysis
  • Added qt.cfg and sfml.cfg, improved several existing .cfg files

GUI:

  • Use CFGDIR macro

Windows installer:

  • We have dropped support for Windows XP in the precompiled binary. It was too much work to maintain the toolset.

Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.

1.78

01 Apr 10:07
Compare
Choose a tag to compare

General changes:

  • Reduced memory usage by up to 10% by reducing size of token list

New checks:

  • Mismatching argument names between function declaration and definition
  • Detect classes which have a copy constructor but no copy operator and vice versa

Checking improvements:

  • Improved matching of overloaded functions
  • Improved ValueType analysis, especially related to allocations with "new" and C++11's "auto"
  • Improved support for C++11 brace initialization
  • Improved ValueFlow analysis
  • Improved template parsing
  • Improved detection of memory leaks
  • Improved nullpointer checking when nullptr and NULL are used
  • Detect array out of bounds across compilation units
  • Extended windows.cfg, posix.cfg and std.cfg

Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.

Cppcheck-1.77

31 Dec 18:09
Compare
Choose a tag to compare

General changes:

  • Added flag --cppcheck-build-dir to allow incremental analysis and inter-file checking
  • Improved --project support for Visual Studio solutions

Removed checks:

New checks:

  • Detect pointer overflow
  • Detect usage of variable after std::move or std::forward

Checking improvements:

  • Warn about number and char literals in boolean expressions
  • Improved checking for variables modified but not used again
  • Libraries: Added support to specify
  • Improved ValueFlow, especially related to function return values and casts
  • Improved simplification of Null values to allow more accurate checking
  • Several improvements to windows.cfg, posix.cfg, gnu.cfg and std.cfg
  • Reimplemented check for using iterators of mismatching containers

GUI:

  • Support build directory as in CLI

Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.

Cppcheck-1.76.1

12 Oct 20:24
Compare
Choose a tag to compare

1.76

08 Oct 19:38
Compare
Choose a tag to compare

General changes:

  • Completed CWE mapping
  • Support opening project files of external build systems, including CMake and Visual Studio (CLI: --project)
  • XML format version 1 is deprecated and will be removed in 1.81

Removed checks:

New checks:

Checking improvements:

  • Improved checking for conditions that are always true/false
  • Improved format string checking: Support more functions, support %h and %hh
  • Improved std.cfg, windows.cfg and qt.cfg; added wxwidgets.cfg
  • Improved ValueFlow analysis
  • Improved SymbolDatabase accuracy
  • Improved Preprocessor (simplecpp)
  • Support base class methods in Library

GUI:

  • Support opening project files from GUI
  • Added .desktop file

Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.