How to Install and Uninstall cppcheck Package on Ubuntu 21.10 (Impish Indri)

Last updated: May 04,2024

1. Install "cppcheck" package

In this section, we are going to explain the necessary steps to install cppcheck on Ubuntu 21.10 (Impish Indri)

$ sudo apt update $ sudo apt install cppcheck

2. Uninstall "cppcheck" package

Please follow the steps below to uninstall cppcheck on Ubuntu 21.10 (Impish Indri):

$ sudo apt remove cppcheck $ sudo apt autoclean && sudo apt autoremove

3. Information about the cppcheck package on Ubuntu 21.10 (Impish Indri)

Package: cppcheck
Architecture: amd64
Version: 2.3-1
Priority: optional
Section: universe/devel
Origin: Ubuntu
Maintainer: Ubuntu Developers
Original-Maintainer: Joachim Reichel
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 7264
Depends: libc6 (>= 2.29), libgcc-s1 (>= 3.0), libpcre3, libstdc++6 (>= 9), libtinyxml2-8 (>= 8.0.0), libz3-4 (>= 4.8.9), python3:any, python3-pygments
Suggests: cppcheck-gui, clang, clang-tidy
Filename: pool/universe/c/cppcheck/cppcheck_2.3-1_amd64.deb
Size: 1706468
MD5sum: 889ab4e7f487a9ca85df3f3bf67a54e0
SHA1: 5ba33782efd98ff8d05673c647a3c6a94f978b4e
SHA256: 47078d6de6abf2ddf9502f71fceb75958b8d203c72ecc69061b24fa3a684f117
SHA512: 9cf2a4f879ce547d122b4d4780ca72290b9edfd0e82d3b329574c0d0ed6666472464fbd3f2333be96284d62c82a600dbf4f3ea4b64675eb81983bc508914ba64
Homepage: http://sourceforge.net/p/cppcheck/wiki/Home/
Description-en: tool for static C/C++ code analysis (CLI)
Cppcheck is a command-line tool that tries to detect bugs that your
C/C++ compiler doesn't see. It is versatile, and can check non-standard
code including various compiler extensions, inline assembly code, etc.
Its internal preprocessor can handle includes, macros, and several
preprocessor commands. While Cppcheck is highly configurable,
you can start using it just by giving it a path to the source code.
.
It includes checks for:
* pointers to out-of-scope auto variables;
* assignment of auto variables to an effective parameter of a function;
* out-of-bounds errors in arrays and STL;
* missing class constructors;
* variables not initialized by a constructor;
* use of memset, memcpy, etcetera on a class;
* non-virtual destructors for base classes;
* operator= not returning a constant reference to itself;
* use of deprecated functions (mktemp, gets, scanf);
* exceptions thrown in destructors;
* memory leaks in class or function variables;
* C-style pointer cast in C++ code;
* redundant if;
* misuse of the strtol or sprintf functions;
* unsigned division or division by zero;
* unused functions and struct members;
* passing parameters by value;
* misuse of signed char variables;
* unusual pointer arithmetic (such as "abc" + 'd');
* dereferenced null pointers;
* incomplete statements;
* misuse of iterators when iterating through a container;
* dereferencing of erased iterators;
* use of invalidated vector iterators/pointers;
.
This package contains the command-line interface for cppcheck.
Description-md5: 9998bc10c93cd21710a4b0829a0bcc92