Cppcheck

The Cppcheck team·Cppcheck.Cppcheck

Cppcheck is a static analysis tool for C/C++ code.

Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect. The goal is to detect only real errors in the code (i.e. have zero false positives).

winget install --id Cppcheck.Cppcheck --exact --source winget

Latest 2.21.0·June 4, 2026

Release Notes

Release Notes for Cppcheck 2.21 Major bug fixes & crashes:

  • Fixed potential crash with incomplete preprocessor directive
  • Fixed hang in createAst
  • Fixed invalid AST for braced initialization and references/pointers
  • Fixed cppcheckError with array typedef
  • Fixed recheck which now correctly excludes non selected files
  • Fixed potential crash when rechecking files in gui New checks:
  • MISRA C 2012 rule 10.3 now warns on assigning integer literals 0 and 1 to bool in C99 and later while preserving the existing C89 behavior.
  • funcArgNamesDifferentUnnamed warns on function declarations/definitions where a parameter in either location is unnamed
  • uninitMemberVarNoCtor warns on user-defined types where (1) some but not all members requiring initialization have in-class initializers or (2) there is a mixture of members which do/do not require initialization.
  • fcloseInLoopCondition warns when fclose() is used as a while loop condition, which may skip the loop body or double-close the file handle. C/C++ support:
  • import project: include path in compile_commands.json now handled correctly GUI:
  • Removed handling of Cppcheck Premium LOC license Other:
  • Make it possible to specify the regular expression engine using the engine element in a rule XML.
  • Added CLI option --exitcode-suppress to specify an error ID which should not result in a non-zero exitcode.
  • Moved source code from https://github.com/danmar/cppcheck to https://github.com/cppcheck-opensource/cppcheck
  • The official Windows binary is now built with Visual Studio 2026.
  • Updated simplecpp to 1.7.0.

Installer type: wix

x64A86EEF1180DC18FDE46B08F4E4B12F2A1EAD8CFC0DD6C294AAC8757748CBBB24

Details

Homepage
https://github.com/danmar/cppcheck
License
GPL-3.0
Publisher
The Cppcheck team
Moniker
cppcheck

Tags

adminanalysisc++checkcodecppstatic

Older versions (20)

2.20.0
x64BB1132BCA1BCA857A6CE3F04605698F002196070A947CAE7015EEDDC3C00F449
2.19.0
x64AAC15F6DC2B404B3B2562015419F11D91F391E686279CABD20627A8435782128
2.18.0
x64651C14395B8F8B2F18B7C08FF27533142ECAFD60B6BE0DC123F92FBD873CB638
2.17.1
x64BCC28E10AE88584A5844540F0B9D54419EB04185F506565459117EC73D63F137
2.16.0
x64B4137578B4E76F0A1065D561C99D8A286BB1159BC29A0B1914CC33AFC7A890B0
2.15.0
x64923243A2677CF9572A6341C94C3A804691689B094DCAFBAA95C04530E1662FC9
2.14.2
x64C6DA399327B33C5A56676981FABBA550AC0AD172A739E956D5F0256E5321E0CD
2.14.1
x64824A11B5B90A49717DA24A44AA9C925AB451A690E1C52CF98F4C1D4983A66EA9
2.14.0
x64DF27B2346D941D7C502B3A95B10FFB0DFF9E06B6063F5C282452FADD8A78F54B
2.13.0
x6472C4910DD5D027353DEB88D98498E27B9E4F0BA49467C9130796EE91E9A646C2
2.12.0
x64780F0B0A56C0EC6CEA9A8D81A197FD8AFC8313ADEF22C5698FE022C446D3F3F0
2.11
x6455BCE7A8911CCDA48D631204D95C9DC6606A590F161E45593452FEFE750B39C7
2.10
x641963084475F34628A5C100ED8B90834D8575D28DD4EC9548D4C92C138DF2FB9F
2.9
x64090DA7BBE16D2E9B1658BC482245B8D342C66A8165DC5F83B0E06A7375FB9B69
2.8
x64752037A631A23698C03609FBCE9339A5466D2E25EA05DA57B948DF61B6ED873E
2.7
x64D481563ECCA60D0C2279AC2AE1AA9B35991A284D6CB7D126E64BB84546A3CBA1
2.6
x642094F180E3E1E16D4EC77560289C909178707A3E3EC46AA06EE399DC63AF841D
2.5
x645CDA946E59C8402FB82186BF94BF1F70FF74D8F36110B20F044AC2EE31D84A77
2.4.1
x64380414BFD26BA86DC635743168C365E5F73E0D114B266B13C5AE9EA8EA1EAB60
2.3
x6438A2D796F8F7D50ABB45F5F7158B8443AC7660F4A1A9EFC7D4A7EE2EC85C2118